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 "vtkPropCollection.h"
33 #include "vtkProp3D.h" // Needed for inline methods
34 
36 {
37 public:
38  static vtkProp3DCollection *New();
40  virtual void PrintSelf(ostream& os, vtkIndent indent);
41 
43  void AddItem(vtkProp3D *p);
44 
46  vtkProp3D *GetNextProp3D();
47 
49  vtkProp3D *GetLastProp3D();
50 
51  //BTX
53 
55  vtkProp3D *GetNextProp3D(vtkCollectionSimpleIterator &cookie)
56  {
57  return static_cast<vtkProp3D *>(this->GetNextItemAsObject(cookie));
58  }
59  //ETX
61 
62 protected:
65 
66 
67 private:
68  // hide the standard AddItem from the user and the compiler.
69  void AddItem(vtkObject *o)
70  {
71  this->vtkCollection::AddItem(o);
72  }
73  void AddItem(vtkProp *o)
74  {
76  }
77 
78 private:
79  vtkProp3DCollection(const vtkProp3DCollection&); // Not implemented.
80  void operator=(const vtkProp3DCollection&); // Not implemented.
81 };
82 
84 {
85  this->vtkCollection::AddItem(a);
86 }
87 
89 {
90  return static_cast<vtkProp3D *>(this->GetNextItemAsObject());
91 }
92 
94 {
95  if ( this->Bottom == NULL )
96  {
97  return NULL;
98  }
99  else
100  {
101  return static_cast<vtkProp3D *>(this->Bottom->Item);
102  }
103 }
104 
105 #endif
106 
107 
108 
109 
110