VTK  9.1.0
vtkTransformCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTransformCollection.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=========================================================================*/
27#ifndef vtkTransformCollection_h
28#define vtkTransformCollection_h
29
30#include "vtkCollection.h"
31#include "vtkCommonTransformsModule.h" // For export macro
32
33#include "vtkTransform.h" // Needed for inline methods
34
35class VTKCOMMONTRANSFORMS_EXPORT vtkTransformCollection : public vtkCollection
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
45 void AddItem(vtkTransform*);
46
51 vtkTransform* GetNextItem();
52
58 {
59 return static_cast<vtkTransform*>(this->GetNextItemAsObject(cookie));
60 }
61
62protected:
64 ~vtkTransformCollection() 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
70private:
72 void operator=(const vtkTransformCollection&) = delete;
73};
74
75//----------------------------------------------------------------------------
77{
79}
80
81//----------------------------------------------------------------------------
83{
84 return static_cast<vtkTransform*>(this->GetNextItemAsObject());
85}
86
87#endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
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
Definition: vtkTransform.h:164
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48