VTK  9.5.2
vtkProp3DCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
17
18#ifndef vtkProp3DCollection_h
19#define vtkProp3DCollection_h
20
21#include "vtkProp3D.h" // Needed for inline methods
22#include "vtkPropCollection.h"
23#include "vtkRenderingCoreModule.h" // For export macro
24#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25
26VTK_ABI_NAMESPACE_BEGIN
27class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkProp3DCollection : public vtkPropCollection
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
37 void AddItem(vtkProp3D* p);
38
43
48
54 {
55 return static_cast<vtkProp3D*>(this->GetNextItemAsObject(cookie));
56 }
57
58protected:
60 ~vtkProp3DCollection() override = default;
61
62private:
63 // hide the standard AddItem from the user and the compiler.
64 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
65 void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
66
67 vtkProp3DCollection(const vtkProp3DCollection&) = delete;
68 void operator=(const vtkProp3DCollection&) = delete;
69};
70
75
77{
78 return static_cast<vtkProp3D*>(this->GetNextItemAsObject());
79}
80
82{
83 if (this->Bottom == nullptr)
84 {
85 return nullptr;
86 }
87 else
88 {
89 return static_cast<vtkProp3D*>(this->Bottom->Item);
90 }
91}
92
93VTK_ABI_NAMESPACE_END
94#endif
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition vtkIndent.h:29
vtkProp3D * GetNextProp3D()
Get the next actor in the list.
~vtkProp3DCollection() override=default
vtkProp3DCollection()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkProp3DCollection * New()
void AddItem(vtkProp3D *p)
Add an actor to the bottom of the list.
vtkProp3D * GetNextProp3D(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkProp3D * GetLastProp3D()
Get the last actor in the list.
represents an 3D object for placement in a rendered scene
Definition vtkProp3D.h:40
vtkPropCollection()=default
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:44
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO