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=========================================================================*/
28#ifndef vtkPlaneCollection_h
29#define vtkPlaneCollection_h
30
31#include "vtkCommonDataModelModule.h" // For export macro
32#include "vtkCollection.h"
33
34#include "vtkPlane.h" // Needed for inline methods
35
36class VTKCOMMONDATAMODEL_EXPORT vtkPlaneCollection : public vtkCollection
37{
38public:
41
45 void AddItem(vtkPlane *);
46
50 vtkPlane *GetNextItem();
51
55 vtkPlane *GetItem(int i) {
56 return static_cast<vtkPlane *>(this->GetItemAsObject(i));};
57
63
64protected:
66 ~vtkPlaneCollection() VTK_OVERRIDE {}
67
68
69private:
70 // hide the standard AddItem from the user and the compiler.
71 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
72
73private:
74 vtkPlaneCollection(const vtkPlaneCollection&) VTK_DELETE_FUNCTION;
75 void operator=(const vtkPlaneCollection&) VTK_DELETE_FUNCTION;
76};
77
79{
81}
82
84{
85 return static_cast<vtkPlane *>(this->GetNextItemAsObject());
86}
87
88#endif
89// VTK-HeaderTest-Exclude: vtkPlaneCollection.h
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkObject * GetItemAsObject(int i)
Get the i'th item in the collection.
void AddItem(vtkObject *)
Add an object to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
abstract base class for most VTK objects
Definition: vtkObject.h:60
maintain a list of planes
~vtkPlaneCollection() override
vtkPlane * GetNextItem()
Get the next plane in the list.
static vtkPlaneCollection * New()
void AddItem(vtkPlane *)
Add a plane to the list.
vtkPlane * GetNextPlane(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkPlane * GetItem(int i)
Get the ith plane in the list.
perform various plane computations
Definition: vtkPlane.h:38
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47