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 =========================================================================*/
26 #ifndef __vtkProp3DCollection_h
27 #define __vtkProp3DCollection_h
28 
29 #include "vtkPropCollection.h"
30 #include "vtkProp3D.h" // Needed for inline methods
31 
33 {
34 public:
35  static vtkProp3DCollection *New();
37  virtual void PrintSelf(ostream& os, vtkIndent indent);
38 
40  void AddItem(vtkProp3D *p);
41 
43  vtkProp3D *GetNextProp3D();
44 
46  vtkProp3D *GetLastProp3D();
47 
48  //BTX
50 
53  {
54  return static_cast<vtkProp3D *>(this->GetNextItemAsObject(cookie));
55  }
56  //ETX
58 
59 protected:
62 
63 
64 private:
65  // hide the standard AddItem from the user and the compiler.
66  void AddItem(vtkObject *o)
67  {
68  this->vtkCollection::AddItem(o);
69  }
70  void AddItem(vtkProp *o)
71  {
73  }
74 
75 private:
76  vtkProp3DCollection(const vtkProp3DCollection&); // Not implemented.
77  void operator=(const vtkProp3DCollection&); // Not implemented.
78 };
79 
81 {
82  this->vtkCollection::AddItem(a);
83 }
84 
86 {
87  return static_cast<vtkProp3D *>(this->GetNextItemAsObject());
88 }
89 
91 {
92  if ( this->Bottom == NULL )
93  {
94  return NULL;
95  }
96  else
97  {
98  return static_cast<vtkProp3D *>(this->Bottom->Item);
99  }
100 }
101 
102 #endif
103 
104 
105 
106 
107 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:60
void PrintSelf(ostream &os, vtkIndent indent)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:41
vtkProp3D * GetNextProp3D(vtkCollectionSimpleIterator &cookie)
a list of Props
a simple class to control print indentation
Definition: vtkIndent.h:37
a list of 3D props
vtkCollectionElement * Bottom
#define VTK_RENDERING_EXPORT
void AddItem(vtkObject *)
void AddItem(vtkProp *a)
vtkProp3D * GetNextProp3D()
vtkObject * GetNextItemAsObject()
static vtkPropCollection * New()
void AddItem(vtkProp3D *p)
vtkProp3D * GetLastProp3D()