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
31VTK_ABI_NAMESPACE_BEGIN
32class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
33{
34public:
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
70protected:
72 ~vtkRendererCollection() override = default;
73
74private:
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
82VTK_ABI_NAMESPACE_END
83#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:38
abstract base class for most VTK objects
Definition vtkObject.h:58
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:68
void * vtkCollectionSimpleIterator