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 =========================================================================*/
32 #ifndef vtkPropCollection_h
33 #define vtkPropCollection_h
34 
35 #include "vtkRenderingCoreModule.h" // For export macro
36 #include "vtkCollection.h"
37 
38 #include "vtkProp.h" // Needed for inline methods
39 
41 {
42  public:
43  static vtkPropCollection *New();
45 
47  void AddItem(vtkProp *a);
48 
50  vtkProp *GetNextProp();
51 
53  vtkProp *GetLastProp();
54 
59  int GetNumberOfPaths();
60 
61  //BTX
63 
66  return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
67  //ETX
69 
70 protected:
73 
74 
75 private:
76  // hide the standard AddItem from the user and the compiler.
77  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
78 
79 private:
80  vtkPropCollection(const vtkPropCollection&); // Not implemented.
81  void operator=(const vtkPropCollection&); // Not implemented.
82 };
83 
85 {
86  this->vtkCollection::AddItem(a);
87 }
88 
90 {
91  return static_cast<vtkProp *>(this->GetNextItemAsObject());
92 }
93 
95 {
96  if ( this->Bottom == NULL )
97  {
98  return NULL;
99  }
100  else
101  {
102  return static_cast<vtkProp *>(this->Bottom->Item);
103  }
104 }
105 
106 #endif
107 
108 
109 
110 
111 
112 // VTK-HeaderTest-Exclude: vtkPropCollection.h
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkProp * GetNextProp(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:61
a list of Props
static vtkCollection * New()
vtkProp * GetLastProp()
vtkCollectionElement * Bottom
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()