VTK
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 "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkCollection.h"
32 #include "vtkRenderer.h" // Needed for static cast
33 
34 class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
35 {
36 public:
37  static vtkRendererCollection *New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
45  { this->vtkCollection::AddItem(a); }
46 
47 
53  { return static_cast<vtkRenderer *>(this->GetNextItemAsObject()); }
54 
58  void Render();
59 
64  vtkRenderer *GetFirstRenderer();
65 
71  { return static_cast<vtkRenderer *>(this->GetNextItemAsObject(cookie)); }
72 
73 protected:
76 
77 private:
78  // hide the standard AddItem from the user and the compiler.
79  void AddItem(vtkObject *o)
80  { this->vtkCollection::AddItem(o); }
81 
82  vtkRendererCollection(const vtkRendererCollection&) VTK_DELETE_FUNCTION;
83  void operator=(const vtkRendererCollection&) VTK_DELETE_FUNCTION;
84 };
85 
86 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkRenderer * GetNextRenderer(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract base class for most VTK objects
Definition: vtkObject.h:59
abstract specification for renderers
Definition: vtkRenderer.h:63
a list of renderers
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCollection * New()
Construct with empty list.
vtkRenderer * GetNextItem()
Get the next Renderer in the list.
void AddItem(vtkRenderer *a)
Add a Renderer to the list.
void AddItem(vtkObject *)
Add an object to the list.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkObject * GetNextItemAsObject()
Get the next item in the collection.