VTK  9.3.20240422
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
124#ifndef vtkRendererCollection_h
125#define vtkRendererCollection_h
126
127#include "vtkCollection.h"
128#include "vtkRenderer.h" // Needed for static cast
129#include "vtkRenderingCoreModule.h" // For export macro
130#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
131
132VTK_ABI_NAMESPACE_BEGIN
133class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRendererCollection : public vtkCollection
134{
135public:
138 void PrintSelf(ostream& os, vtkIndent indent) override;
139
144
149 vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
150
154 void Render();
155
161
167 {
168 return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
169 }
170
171protected:
173 ~vtkRendererCollection() override = default;
174
175private:
176 // hide the standard AddItem from the user and the compiler.
177 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
178
180 void operator=(const vtkRendererCollection&) = delete;
181};
182
183VTK_ABI_NAMESPACE_END
184#endif
create and manipulate ordered lists of objects
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:108
abstract base class for most VTK objects
Definition vtkObject.h:162
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
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO