VTK
vtkPropCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPropCollection.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 vtkPropCollection_h
30 #define vtkPropCollection_h
31 
32 #include "vtkRenderingCoreModule.h" // For export macro
33 #include "vtkCollection.h"
34 
35 #include "vtkProp.h" // Needed for inline methods
36 
38 {
39  public:
40  static vtkPropCollection *New();
42 
44  void AddItem(vtkProp *a);
45 
47  vtkProp *GetNextProp();
48 
50  vtkProp *GetLastProp();
51 
56  int GetNumberOfPaths();
57 
58  //BTX
60 
63  return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
64  //ETX
66 
67 protected:
70 
71 
72 private:
73  // hide the standard AddItem from the user and the compiler.
74  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
75 
76 private:
77  vtkPropCollection(const vtkPropCollection&); // Not implemented.
78  void operator=(const vtkPropCollection&); // Not implemented.
79 };
80 
82 {
83  this->vtkCollection::AddItem(a);
84 }
85 
87 {
88  return static_cast<vtkProp *>(this->GetNextItemAsObject());
89 }
90 
92 {
93  if ( this->Bottom == NULL )
94  {
95  return NULL;
96  }
97  else
98  {
99  return static_cast<vtkProp *>(this->Bottom->Item);
100  }
101 }
102 
103 #endif
104 
105 
106 
107 
108 
109 // VTK-HeaderTest-Exclude: vtkPropCollection.h
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkProp * GetNextProp(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
a list of Props
static vtkCollection * New()
vtkProp * GetLastProp()
void AddItem(vtkObject *)
void AddItem(vtkProp *a)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
#define VTKRENDERINGCORE_EXPORT
vtkProp * GetNextProp()
vtkObject * GetNextItemAsObject()