VTK  9.4.20251007
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
14
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRendererCollection : public vtkCollection
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
35
40 vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
41
45 void Render();
46
52
58 {
59 return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
60 }
61
62protected:
64 ~vtkRendererCollection() override = default;
65
66private:
67 // hide the standard AddItem from the user and the compiler.
68 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
69
71 void operator=(const vtkRendererCollection&) = delete;
72};
73
74VTK_ABI_NAMESPACE_END
75#endif
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
an ordered list of renderers
vtkRendererCollection()=default
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 * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
static vtkRendererCollection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRenderer * GetFirstRenderer()
Get the first Renderer in the list.
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
~vtkRendererCollection() override=default
abstract specification for renderers
Definition vtkRenderer.h:63
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO