VTK  9.1.0
vtkRendererCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRendererCollection.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
136#ifndef vtkRendererCollection_h
137#define vtkRendererCollection_h
138
139#include "vtkCollection.h"
140#include "vtkRenderer.h" // Needed for static cast
141#include "vtkRenderingCoreModule.h" // For export macro
142
143class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
144{
145public:
148 void PrintSelf(ostream& os, vtkIndent indent) override;
149
154
159 vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
160
164 void Render();
165
171
177 {
178 return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
179 }
180
181protected:
183 ~vtkRendererCollection() override = default;
184
185private:
186 // hide the standard AddItem from the user and the compiler.
187 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
188
190 void operator=(const vtkRendererCollection&) = delete;
191};
192
193#endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
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:173
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48