VTK
vtkActor2DCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkActor2DCollection.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 vtkActor2DCollection_h
28 #define vtkActor2DCollection_h
29 
30 #include "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkPropCollection.h"
32 
33 #include "vtkActor2D.h" // Needed for inline methods
34 
35 class vtkViewport;
36 
38 {
39  public:
43 
45 
48  void Sort();
49 
53 
55 
57  vtkActor2D *GetNextActor2D();
58  vtkActor2D *GetLastActor2D();
60 
62 
65  vtkActor2D *GetNextItem();
66  vtkActor2D *GetLastItem();
68 
69 
71  void RenderOverlay(vtkViewport* viewport);
72 
73  //BTX
75 
78  return static_cast<vtkActor2D *>(this->GetNextItemAsObject(cookie));};
79  //ETX
81 
82 protected:
85 
87 
88 private:
89  // hide the standard AddItem from the user and the compiler.
90  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
91  void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
92  int IsItemPresent(vtkObject *o) { return this->vtkCollection::IsItemPresent(o); };
93 
94 private:
95  vtkActor2DCollection(const vtkActor2DCollection&); // Not implemented.
96  void operator=(const vtkActor2DCollection&); // Not implemented.
97 };
98 
100 {
101  return this->vtkCollection::IsItemPresent(a);
102 }
103 
105 {
106  return static_cast<vtkActor2D *>(this->GetNextItemAsObject());
107 }
108 
110 {
111  if ( this->Bottom == NULL )
112  {
113  return NULL;
114  }
115  else
116  {
117  return static_cast<vtkActor2D *>(this->Bottom->Item);
118  }
119 }
120 
122 {
123  return this->GetNextActor2D();
124 }
125 
127 {
128  return this->GetLastActor2D();
129 }
130 
131 #endif
132 
133 
134 
135 
136 
137 // VTK-HeaderTest-Exclude: vtkActor2DCollection.h
vtkActor2DCollection::IsItemPresent
int IsItemPresent(vtkActor2D *a)
Definition: vtkActor2DCollection.h:99
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkActor2DCollection::AddItem
void AddItem(vtkActor2D *a)
vtkActor2DCollection::GetLastActor2D
vtkActor2D * GetLastActor2D()
Definition: vtkActor2DCollection.h:109
vtkActor2DCollection::GetLastItem
vtkActor2D * GetLastItem()
Definition: vtkActor2DCollection.h:126
vtkCollection::IsItemPresent
int IsItemPresent(vtkObject *a)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkActor2DCollection::vtkActor2DCollection
vtkActor2DCollection()
Definition: vtkActor2DCollection.h:83
vtkCollectionElement::Item
vtkObject * Item
Definition: vtkCollection.h:44
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Definition: vtkCollection.h:156
vtkActor2DCollection::GetNextItem
vtkActor2D * GetNextItem()
Definition: vtkActor2DCollection.h:121
vtkActor2DCollection::GetNextActor2D
vtkActor2D * GetNextActor2D()
Definition: vtkActor2DCollection.h:104
vtkCollection::Bottom
vtkCollectionElement * Bottom
Definition: vtkCollection.h:141
vtkRenderingCoreModule.h
vtkPropCollection::AddItem
void AddItem(vtkProp *a)
Definition: vtkPropCollection.h:81
vtkActor2DCollection::RenderOverlay
void RenderOverlay(vtkViewport *viewport)
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkActor2DCollection::New
static vtkActor2DCollection * New()
vtkActor2DCollection::GetNextActor2D
vtkActor2D * GetNextActor2D(vtkCollectionSimpleIterator &cookie)
Definition: vtkActor2DCollection.h:77
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
vtkActor2DCollection::DeleteElement
virtual void DeleteElement(vtkCollectionElement *)
vtkActor2DCollection::~vtkActor2DCollection
~vtkActor2DCollection()
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkActor2D.h
vtkActor2DCollection
a list of 2D actors
Definition: vtkActor2DCollection.h:38
vtkCollection::AddItem
void AddItem(vtkObject *)
vtkCollectionElement
Definition: vtkCollection.h:41
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkActor2DCollection::Sort
void Sort()
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkPropCollection.h