VTK  9.3.0
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
24 #ifndef vtkRendererCollection_h
25 #define vtkRendererCollection_h
26 
27 #include "vtkCollection.h"
28 #include "vtkRenderer.h" // Needed for static cast
29 #include "vtkRenderingCoreModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43 
48  vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
49 
53  void Render();
54 
60 
66  {
67  return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
68  }
69 
70 protected:
71  vtkRendererCollection() = default;
72  ~vtkRendererCollection() override = default;
73 
74 private:
75  // hide the standard AddItem from the user and the compiler.
76  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
77 
79  void operator=(const vtkRendererCollection&) = delete;
80 };
81 
82 VTK_ABI_NAMESPACE_END
83 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
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:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
an ordered list of renderers
vtkRendererCollection()=default
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
void Render()
Forward the Render() method to each renderer in the list.
void AddItem(vtkRenderer *a)
Add a Renderer to the bottom of the list.
vtkRenderer * GetFirstRenderer()
Get the first Renderer in the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkRendererCollection * New()
~vtkRendererCollection() override=default
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract specification for renderers
Definition: vtkRenderer.h:71
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40