VTK  9.7.1
vtkRendererCollection.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
18 #ifndef vtkRendererCollection_h
19 #define vtkRendererCollection_h
20 
21 #include "vtkCollection.h"
22 #include "vtkRenderer.h" // Needed for static cast
23 #include "vtkRenderingCoreModule.h" // For export macro
24 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRendererCollection : public vtkCollection
28 {
29 public:
30  static vtkRendererCollection* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
38 
43  vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
44 
48  void Render();
49 
54  vtkRenderer* GetFirstRenderer();
55 
61  {
62  return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
63  }
64 
65 protected:
66  vtkRendererCollection() = default;
67  ~vtkRendererCollection() override = default;
68 
69 private:
70  // hide the standard AddItem from the user and the compiler.
71  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
72 
74  void operator=(const vtkRendererCollection&) = delete;
75 };
76 
77 VTK_ABI_NAMESPACE_END
78 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:35
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract base class for most VTK objects
Definition: vtkObject.h:52
abstract specification for renderers
Definition: vtkRenderer.h:63
an ordered list of renderers
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCollection * New()
Construct an empty collection.
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
void AddItem(vtkRenderer *a)
Add a Renderer to the bottom of the list.
void AddItem(vtkObject *)
Add given item to the bottom (end) of the collection.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:39
#define VTK_MARSHALAUTO
vtkObject * GetNextItemAsObject()
Get the next item in the collection.