VTK  9.5.20250620
vtkTransformCollection.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
15#ifndef vtkTransformCollection_h
16#define vtkTransformCollection_h
17
18#include "vtkCollection.h"
19#include "vtkCommonTransformsModule.h" // For export macro
20
21#include "vtkTransform.h" // Needed for inline methods
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKCOMMONTRANSFORMS_EXPORT vtkTransformCollection : public vtkCollection
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
34 void AddItem(vtkTransform*);
35
40 vtkTransform* GetNextItem();
41
47 {
48 return static_cast<vtkTransform*>(this->GetNextItemAsObject(cookie));
49 }
50
51protected:
53 ~vtkTransformCollection() override = default;
54
55private:
56 // hide the standard AddItem from the user and the compiler.
57 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
58
60 void operator=(const vtkTransformCollection&) = delete;
61};
62
63//----------------------------------------------------------------------------
65{
67}
68
69//----------------------------------------------------------------------------
71{
72 return static_cast<vtkTransform*>(this->GetNextItemAsObject());
73}
74
75VTK_ABI_NAMESPACE_END
76#endif
create and manipulate ordered lists of objects
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:108
abstract base class for most VTK objects
Definition vtkObject.h:162
maintain a list of transforms
~vtkTransformCollection() override=default
static vtkTransformCollection * New()
vtkTransform * GetNextTransform(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkTransform *)
Add a Transform to the list.
vtkTransformCollection()=default
vtkTransform * GetNextItem()
Get the next Transform in the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
describes linear transformations via a 4x4 matrix
void * vtkCollectionSimpleIterator