VTK  9.7.20261102
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
37
38#ifndef vtkPlaneCollection_h
39#define vtkPlaneCollection_h
40
41#include "vtkCollection.h"
42#include "vtkCommonDataModelModule.h" // For export macro
43#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
44
45#include "vtkPlane.h" // Needed for inline methods
46
47VTK_ABI_NAMESPACE_BEGIN
48class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkPlaneCollection : public vtkCollection
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 void AddItem(vtkPlane*);
59
64
68 vtkPlane* GetItem(int i) { return static_cast<vtkPlane*>(this->GetItemAsObject(i)); }
69
75
76protected:
77 vtkPlaneCollection() = default;
78 ~vtkPlaneCollection() override = default;
79
80private:
81 // hide the standard AddItem from the user and the compiler.
82 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
83
85 void operator=(const vtkPlaneCollection&) = delete;
86};
87
89{
91}
92
94{
95 return static_cast<vtkPlane*>(this->GetNextItemAsObject());
96}
97
98VTK_ABI_NAMESPACE_END
99#endif
vtkCollection()=default
void AddItem(vtkObject *)
Add given item to the bottom (end) of the collection.
vtkObject * GetItemAsObject(int i) VTK_FUTURE_CONST
Get the i'th item in the collection.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition vtkIndent.h:108
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:141
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO