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:
39  static vtkProp3DCollection *New();
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 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:61
void PrintSelf(ostream &os, vtkIndent indent)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:42
vtkProp3D * GetNextProp3D(vtkCollectionSimpleIterator &cookie)
a list of Props
a simple class to control print indentation
Definition: vtkIndent.h:38
a list of 3D props
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
void AddItem(vtkProp *a)
#define VTKRENDERINGCORE_EXPORT
vtkProp3D * GetNextProp3D()
vtkObject * GetNextItemAsObject()
static vtkPropCollection * New()
void AddItem(vtkProp3D *p)
vtkProp3D * GetLastProp3D()