VTK  9.2.20220705
vtkAssemblyPath.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAssemblyPath.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 =========================================================================*/
82 #ifndef vtkAssemblyPath_h
83 #define vtkAssemblyPath_h
84 
85 #include "vtkAssemblyNode.h" // used for inlines
86 #include "vtkCollection.h"
87 #include "vtkRenderingCoreModule.h" // For export macro
88 
89 class vtkMatrix4x4;
90 class vtkTransform;
91 class vtkProp;
92 
93 class VTKRENDERINGCORE_EXPORT vtkAssemblyPath : public vtkCollection
94 {
95 public:
97  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
102  static vtkAssemblyPath* New();
103 
111 
121 
128 
134 
140 
146 
151  vtkMTimeType GetMTime() override;
152 
158  {
159  return static_cast<vtkAssemblyNode*>(this->GetNextItemAsObject(cookie));
160  }
161 
162 protected:
164  ~vtkAssemblyPath() override;
165 
166  void AddNode(vtkAssemblyNode* n); // Internal method adds assembly node
167  vtkTransform* Transform; // Used to perform matrix concatenation
168  vtkProp* TransformedProp; // A transformed prop used to do the rendering
169 
170 private:
171  // hide the standard AddItem from the user and the compiler.
172  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
173 
174 private:
175  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
176  void operator=(const vtkAssemblyPath&) = delete;
177 };
178 
179 #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:56
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:119
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:151
abstract base class for most VTK objects
Definition: vtkObject.h:82
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:170
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:51
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:280