VTK
vtkProp3DCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProp3DCollection.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 =========================================================================*/
29 #ifndef vtkProp3DCollection_h
30 #define vtkProp3DCollection_h
31 
32 #include "vtkRenderingCoreModule.h" // For export macro
33 #include "vtkPropCollection.h"
34 #include "vtkProp3D.h" // Needed for inline methods
35 
37 {
38 public:
41  virtual void PrintSelf(ostream& os, vtkIndent indent);
42 
44  void AddItem(vtkProp3D *p);
45 
47  vtkProp3D *GetNextProp3D();
48 
50  vtkProp3D *GetLastProp3D();
51 
52  //BTX
54 
57  {
58  return static_cast<vtkProp3D *>(this->GetNextItemAsObject(cookie));
59  }
60  //ETX
62 
63 protected:
66 
67 
68 private:
69  // hide the standard AddItem from the user and the compiler.
70  void AddItem(vtkObject *o)
71  {
72  this->vtkCollection::AddItem(o);
73  }
74  void AddItem(vtkProp *o)
75  {
77  }
78 
79 private:
80  vtkProp3DCollection(const vtkProp3DCollection&); // Not implemented.
81  void operator=(const vtkProp3DCollection&); // Not implemented.
82 };
83 
85 {
86  this->vtkCollection::AddItem(a);
87 }
88 
90 {
91  return static_cast<vtkProp3D *>(this->GetNextItemAsObject());
92 }
93 
95 {
96  if ( this->Bottom == NULL )
97  {
98  return NULL;
99  }
100  else
101  {
102  return static_cast<vtkProp3D *>(this->Bottom->Item);
103  }
104 }
105 
106 #endif
107 
108 
109 
110 
111 
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkProp3DCollection::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkProp3DCollection::New
static vtkProp3DCollection * New()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkCollectionElement::Item
vtkObject * Item
Definition: vtkCollection.h:44
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Definition: vtkCollection.h:156
vtkProp3DCollection::vtkProp3DCollection
vtkProp3DCollection()
Definition: vtkProp3DCollection.h:64
vtkProp3DCollection::GetNextProp3D
vtkProp3D * GetNextProp3D(vtkCollectionSimpleIterator &cookie)
Definition: vtkProp3DCollection.h:56
vtkProp3DCollection::GetNextProp3D
vtkProp3D * GetNextProp3D()
Definition: vtkProp3DCollection.h:89
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
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
vtkProp3DCollection::~vtkProp3DCollection
~vtkProp3DCollection()
Definition: vtkProp3DCollection.h:65
vtkProp3DCollection::GetLastProp3D
vtkProp3D * GetLastProp3D()
Definition: vtkProp3DCollection.h:94
vtkCollection::AddItem
void AddItem(vtkObject *)
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkProp3DCollection::AddItem
void AddItem(vtkProp3D *p)
Definition: vtkProp3DCollection.h:84
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkProp3DCollection
a list of 3D props
Definition: vtkProp3DCollection.h:37
vtkPropCollection.h
vtkProp3D.h