VTK
vtkActorCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkActorCollection.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 =========================================================================*/
26 #ifndef vtkActorCollection_h
27 #define vtkActorCollection_h
28 
29 #include "vtkRenderingCoreModule.h" // For export macro
30 #include "vtkPropCollection.h"
31 #include "vtkActor.h" // For inline methods
32 
33 class vtkProperty;
34 
36 {
37 public:
40  virtual void PrintSelf(ostream& os, vtkIndent indent);
41 
43  void AddItem(vtkActor *a);
44 
46  vtkActor *GetNextActor();
47 
49  vtkActor *GetLastActor();
50 
52 
55  vtkActor *GetNextItem();
56  vtkActor *GetLastItem();
58 
61 
62  //BTX
64 
67  return static_cast<vtkActor *>(this->GetNextItemAsObject(cookie));};
68  //ETX
70 
71 protected:
74 
75 
76 private:
77  // hide the standard AddItem from the user and the compiler.
78  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
79  void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
80 
81 private:
82  vtkActorCollection(const vtkActorCollection&); // Not implemented.
83  void operator=(const vtkActorCollection&); // Not implemented.
84 };
85 
87 {
88  this->vtkCollection::AddItem(a);
89 }
90 
92 {
93  return static_cast<vtkActor *>(this->GetNextItemAsObject());
94 }
95 
97 {
98  if ( this->Bottom == NULL )
99  {
100  return NULL;
101  }
102  else
103  {
104  return static_cast<vtkActor *>(this->Bottom->Item);
105  }
106 }
107 
109 {
110  return this->GetNextActor();
111 }
112 
114 {
115  return this->GetLastActor();
116 }
117 
118 #endif
119 
120 
121 
122 
123 
vtkActorCollection::GetLastActor
vtkActor * GetLastActor()
Definition: vtkActorCollection.h:96
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkActorCollection::GetNextActor
vtkActor * GetNextActor(vtkCollectionSimpleIterator &cookie)
Definition: vtkActorCollection.h:66
vtkActorCollection::GetNextItem
vtkActor * GetNextItem()
Definition: vtkActorCollection.h:108
vtkActorCollection::AddItem
void AddItem(vtkActor *a)
Definition: vtkActorCollection.h:86
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkActorCollection::~vtkActorCollection
~vtkActorCollection()
Definition: vtkActorCollection.h:73
vtkCollectionElement::Item
vtkObject * Item
Definition: vtkCollection.h:44
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Definition: vtkCollection.h:156
vtkActorCollection::New
static vtkActorCollection * New()
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkCollection::Bottom
vtkCollectionElement * Bottom
Definition: vtkCollection.h:141
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
vtkPropCollection::AddItem
void AddItem(vtkProp *a)
Definition: vtkPropCollection.h:81
vtkActor.h
vtkActorCollection::GetLastItem
vtkActor * GetLastItem()
Definition: vtkActorCollection.h:113
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkActorCollection::GetNextActor
vtkActor * GetNextActor()
Definition: vtkActorCollection.h:91
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
vtkActorCollection::vtkActorCollection
vtkActorCollection()
Definition: vtkActorCollection.h:72
vtkActorCollection::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkActorCollection
a list of actors
Definition: vtkActorCollection.h:36
vtkCollection::AddItem
void AddItem(vtkObject *)
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:64
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkPropCollection.h
vtkActorCollection::ApplyProperties
void ApplyProperties(vtkProperty *p)