VTK
vtkPlaneCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlaneCollection.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 =========================================================================*/
27 #ifndef __vtkPlaneCollection_h
28 #define __vtkPlaneCollection_h
29 
30 #include "vtkCollection.h"
31 
32 #include "vtkPlane.h" // Needed for inline methods
33 
35 {
36 public:
38  static vtkPlaneCollection *New();
39 
41  void AddItem(vtkPlane *);
42 
44  vtkPlane *GetNextItem();
45 
47 
48  vtkPlane *GetItem(int i) {
49  return static_cast<vtkPlane *>(this->GetItemAsObject(i));};
51 
52  //BTX
54 
56  vtkPlane *GetNextPlane(vtkCollectionSimpleIterator &cookie);
57  //ETX
59 
60 protected:
63 
64 
65 private:
66  // hide the standard AddItem from the user and the compiler.
67  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
68 
69 private:
70  vtkPlaneCollection(const vtkPlaneCollection&); // Not implemented.
71  void operator=(const vtkPlaneCollection&); // Not implemented.
72 };
73 
75 {
76  this->vtkCollection::AddItem(f);
77 }
78 
80 {
81  return static_cast<vtkPlane *>(this->GetNextItemAsObject());
82 }
83 
84 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
vtkPlane * GetItem(int i)
abstract base class for most VTK objects
Definition: vtkObject.h:60
maintain a list of planes
static vtkCollection * New()
perform various plane computations
Definition: vtkPlane.h:35
#define VTK_COMMON_EXPORT
vtkPlane * GetNextItem()
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
void AddItem(vtkPlane *)
vtkObject * GetNextItemAsObject()
vtkObject * GetItemAsObject(int i)