VTK  9.2.6
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=========================================================================*/
37#ifndef vtkPlaneCollection_h
38#define vtkPlaneCollection_h
39
40#include "vtkCollection.h"
41#include "vtkCommonDataModelModule.h" // For export macro
42
43#include "vtkPlane.h" // Needed for inline methods
44
45class VTKCOMMONDATAMODEL_EXPORT vtkPlaneCollection : public vtkCollection
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
55 void AddItem(vtkPlane*);
56
60 vtkPlane* GetNextItem();
61
65 vtkPlane* GetItem(int i) { return static_cast<vtkPlane*>(this->GetItemAsObject(i)); }
66
72
73protected:
74 vtkPlaneCollection() = default;
75 ~vtkPlaneCollection() override = default;
76
77private:
78 // hide the standard AddItem from the user and the compiler.
79 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
80
81private:
83 void operator=(const vtkPlaneCollection&) = delete;
84};
85
87{
89}
90
92{
93 return static_cast<vtkPlane*>(this->GetNextItemAsObject());
94}
95
96#endif
create and manipulate ordered lists of objects
vtkObject * GetItemAsObject(int i)
Get the i'th item in the collection.
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition vtkIndent.h:49
abstract base class for most VTK objects
Definition vtkObject.h:72
maintain a list of planes
vtkPlane * GetNextItem()
Get the next plane in the list.
vtkPlaneCollection()=default
~vtkPlaneCollection() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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:46
void * vtkCollectionSimpleIterator