VTK  9.3.0
vtkPlaneCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
25#ifndef vtkPlaneCollection_h
26#define vtkPlaneCollection_h
27
28#include "vtkCollection.h"
29#include "vtkCommonDataModelModule.h" // For export macro
30
31#include "vtkPlane.h" // Needed for inline methods
32
33VTK_ABI_NAMESPACE_BEGIN
34class VTKCOMMONDATAMODEL_EXPORT vtkPlaneCollection : public vtkCollection
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 void AddItem(vtkPlane*);
45
49 vtkPlane* GetNextItem();
50
54 vtkPlane* GetItem(int i) { return static_cast<vtkPlane*>(this->GetItemAsObject(i)); }
55
61
62protected:
63 vtkPlaneCollection() = default;
64 ~vtkPlaneCollection() override = default;
65
66private:
67 // hide the standard AddItem from the user and the compiler.
68 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
69
71 void operator=(const vtkPlaneCollection&) = delete;
72};
73
75{
77}
78
80{
81 return static_cast<vtkPlane*>(this->GetNextItemAsObject());
82}
83
84VTK_ABI_NAMESPACE_END
85#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:38
abstract base class for most VTK objects
Definition vtkObject.h:58
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:35
void * vtkCollectionSimpleIterator