VTK  9.3.1
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
21 #ifndef vtkAssemblyPath_h
22 #define vtkAssemblyPath_h
23 
24 #include "vtkAssemblyNode.h" // used for inlines
25 #include "vtkCollection.h"
26 #include "vtkRenderingCoreModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkMatrix4x4;
30 class vtkTransform;
31 class vtkProp;
32 
33 class VTKRENDERINGCORE_EXPORT vtkAssemblyPath : public vtkCollection
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  static vtkAssemblyPath* New();
43 
50  void AddNode(vtkProp* p, vtkMatrix4x4* m);
51 
60  vtkAssemblyNode* GetNextNode();
61 
67  vtkAssemblyNode* GetFirstNode();
68 
73  vtkAssemblyNode* GetLastNode();
74 
79  void DeleteLastNode();
80 
85  void ShallowCopy(vtkAssemblyPath* path);
86 
91  vtkMTimeType GetMTime() override;
92 
98  {
99  return static_cast<vtkAssemblyNode*>(this->GetNextItemAsObject(cookie));
100  }
101 
102 protected:
103  vtkAssemblyPath();
104  ~vtkAssemblyPath() override;
105 
106  void AddNode(vtkAssemblyNode* n); // Internal method adds assembly node
107  vtkTransform* Transform; // Used to perform matrix concatenation
108  vtkProp* TransformedProp; // A transformed prop used to do the rendering
109 
110 private:
111  // hide the standard AddItem from the user and the compiler.
112  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
113 
114  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
115  void operator=(const vtkAssemblyPath&) = delete;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:51
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:49
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCollection * New()
Construct with empty list.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void AddItem(vtkObject *)
Add an object to the bottom of the list.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:44
vtkProp * TransformedProp
vtkTransform * Transform
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
represent a node in an assembly
vtkAssemblyNode * GetNextNode(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.