VTK  9.3.20240328
vtkAssemblyPath.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
70 #ifndef vtkAssemblyPath_h
71 #define vtkAssemblyPath_h
72 
73 #include "vtkAssemblyNode.h" // used for inlines
74 #include "vtkCollection.h"
75 #include "vtkRenderingCoreModule.h" // For export macro
76 
77 VTK_ABI_NAMESPACE_BEGIN
78 class vtkMatrix4x4;
79 class vtkTransform;
80 class vtkProp;
81 
82 class VTKRENDERINGCORE_EXPORT vtkAssemblyPath : public vtkCollection
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
91  static vtkAssemblyPath* New();
92 
100 
110 
117 
123 
129 
135 
140  vtkMTimeType GetMTime() override;
141 
147  {
148  return static_cast<vtkAssemblyNode*>(this->GetNextItemAsObject(cookie));
149  }
150 
151 protected:
153  ~vtkAssemblyPath() override;
154 
155  void AddNode(vtkAssemblyNode* n); // Internal method adds assembly node
156  vtkTransform* Transform; // Used to perform matrix concatenation
157  vtkProp* TransformedProp; // A transformed prop used to do the rendering
158 
159 private:
160  // hide the standard AddItem from the user and the compiler.
161  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
162 
163  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
164  void operator=(const vtkAssemblyPath&) = delete;
165 };
166 
167 VTK_ABI_NAMESPACE_END
168 #endif
represent a node in an assembly
a list of nodes that form an assembly path
vtkProp * TransformedProp
static vtkAssemblyPath * New()
Instantiate empty path with identify matrix.
void AddNode(vtkAssemblyNode *n)
void AddNode(vtkProp *p, vtkMatrix4x4 *m)
Convenience method adds a prop and matrix together, creating an assembly node transparently.
vtkAssemblyNode * GetNextNode()
Get the next assembly node in the list.
void ShallowCopy(vtkAssemblyPath *path)
Perform a shallow copy (reference counted) on the incoming path.
vtkMTimeType GetMTime() override
Override the standard GetMTime() to check for the modified times of the nodes in this path.
~vtkAssemblyPath() override
vtkAssemblyNode * GetNextNode(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkAssemblyNode * GetFirstNode()
Get the first assembly node in the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAssemblyNode * GetLastNode()
Get the last assembly node in the list.
vtkTransform * Transform
void DeleteLastNode()
Delete the last assembly node in the list.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
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
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:140
abstract base class for most VTK objects
Definition: vtkObject.h:161
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:65
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:159
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270