VTK  9.0.20210624
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 =========================================================================*/
27 #ifndef vtkRendererCollection_h
28 #define vtkRendererCollection_h
29 
30 #include "vtkCollection.h"
31 #include "vtkRenderer.h" // Needed for static cast
32 #include "vtkRenderingCoreModule.h" // For export macro
33 
34 class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45 
50  vtkRenderer* GetNextItem() { return static_cast<vtkRenderer*>(this->GetNextItemAsObject()); }
51 
55  void Render();
56 
62 
68  {
69  return static_cast<vtkRenderer*>(this->GetNextItemAsObject(cookie));
70  }
71 
72 protected:
73  vtkRendererCollection() = default;
74  ~vtkRendererCollection() override = default;
75 
76 private:
77  // hide the standard AddItem from the user and the compiler.
78  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
79 
81  void operator=(const vtkRendererCollection&) = delete;
82 };
83 
84 #endif
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48
vtkCollection.h
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:63
vtkRenderer.h
vtkRendererCollection
an ordered list of renderers
Definition: vtkRendererCollection.h:35
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:179
vtkRendererCollection::AddItem
void AddItem(vtkRenderer *a)
Add a Renderer to the bottom of the list.
Definition: vtkRendererCollection.h:44
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkRendererCollection::~vtkRendererCollection
~vtkRendererCollection() override=default
vtkRendererCollection::New
static vtkRendererCollection * New()
vtkRendererCollection::GetNextItem
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
Definition: vtkRendererCollection.h:50
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkRendererCollection::Render
void Render()
Forward the Render() method to each renderer in the list.
vtkRendererCollection::GetNextRenderer
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkRendererCollection.h:67
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkRendererCollection::vtkRendererCollection
vtkRendererCollection()=default
vtkRendererCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRendererCollection::GetFirstRenderer
vtkRenderer * GetFirstRenderer()
Get the first Renderer in the list.