VTK  9.3.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
15 #ifndef vtkRendererCollection_h
16 #define vtkRendererCollection_h
17 
18 #include "vtkCollection.h"
19 #include "vtkRenderer.h" // Needed for static cast
20 #include "vtkRenderingCoreModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
24 {
25 public:
26  static vtkRendererCollection* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
34 
39  vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
40 
44  void Render();
45 
50  vtkRenderer* GetFirstRenderer();
51 
57  {
58  return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
59  }
60 
61 protected:
62  vtkRendererCollection() = default;
63  ~vtkRendererCollection() override = default;
64 
65 private:
66  // hide the standard AddItem from the user and the compiler.
67  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
68 
70  void operator=(const vtkRendererCollection&) = delete;
71 };
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract base class for most VTK objects
Definition: vtkObject.h:51
abstract specification for renderers
Definition: vtkRenderer.h:61
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 with empty list.
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 an object to the bottom of the list.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:44
vtkObject * GetNextItemAsObject()
Get the next item in the collection.