VTK
vtkCullerCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCullerCollection.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 __vtkCullerCollection_h
27 #define __vtkCullerCollection_h
28 
29 #include "vtkCollection.h"
30 #include "vtkCuller.h" // for inline functions
31 
33 {
34  public:
35  static vtkCullerCollection *New();
37  virtual void PrintSelf(ostream& os, vtkIndent indent);
38 
40 
41  void AddItem(vtkCuller *a)
42  {
43  this->vtkCollection::AddItem(a);
44  }
46 
48 
50  {
51  return static_cast<vtkCuller *>(this->GetNextItemAsObject());
52  }
54 
56  vtkCuller *GetLastItem();
57 
58  //BTX
60 
63  {
64  return static_cast<vtkCuller *>(this->GetNextItemAsObject(cookie));
65  }
66  //ETX
68 
69 protected:
72 
73 private:
74  // hide the standard AddItem from the user and the compiler.
75  void AddItem(vtkObject *o)
76  {
77  this->vtkCollection::AddItem(o);
78  }
79 
80 private:
81  vtkCullerCollection(const vtkCullerCollection&); // Not implemented.
82  void operator=(const vtkCullerCollection&); // Not implemented.
83 };
84 
85 
87 {
88  if ( this->Bottom == NULL )
89  {
90  return NULL;
91  }
92  else
93  {
94  return static_cast<vtkCuller *>(this->Bottom->Item);
95  }
96 }
97 
98 #endif
99 
100 
101 
102 
103