VTK: Rendering/Core/vtkRendererCollection.h Source File

| 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
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:
35 static vtkRendererCollection* New();
36 vtkTypeMacro(vtkRendererCollection, vtkCollection);
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 void AddItem(vtkRenderer* a) { this->vtkCollection::AddItem(a); }
43
48 vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
49
53 void Render();
54
59 vtkRenderer* GetFirstRenderer();
60
65 vtkRenderer* GetNextRenderer(vtkCollectionSimpleIterator& cookie)
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
78 vtkRendererCollection(const vtkRendererCollection&) = delete;
79 void operator=(const vtkRendererCollection&) = delete;
80 };
81
82 VTK_ABI_NAMESPACE_END
83 #endif
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:177
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkRendererCollection
an ordered list of renderers
Definition: vtkRendererCollection.h:33
vtkRendererCollection::vtkRendererCollection
vtkRendererCollection()=default
vtkRendererCollection::GetNextItem
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
Definition: vtkRendererCollection.h:48
vtkRendererCollection::Render
void Render()
Forward the Render() method to each renderer in the list.
vtkRendererCollection::AddItem
void AddItem(vtkRenderer *a)
Add a Renderer to the bottom of the list.
Definition: vtkRendererCollection.h:42
vtkRendererCollection::GetFirstRenderer
vtkRenderer * GetFirstRenderer()
Get the first Renderer in the list.
vtkRendererCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRendererCollection::New
static vtkRendererCollection * New()
vtkRendererCollection::~vtkRendererCollection
~vtkRendererCollection() override=default
vtkRendererCollection::GetNextRenderer
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkRendererCollection.h:65
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkCollection.h
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
vtkRenderer.h