VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkMatrix4x4;
31 class vtkTransform;
32 class vtkProp;
33 
34 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkAssemblyPath : public vtkCollection
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  static vtkAssemblyPath* New();
44 
51  void AddNode(vtkProp* p, vtkMatrix4x4* m);
52 
61  vtkAssemblyNode* GetNextNode();
62 
68  vtkAssemblyNode* GetFirstNode();
69 
74  vtkAssemblyNode* GetLastNode();
75 
80  void DeleteLastNode();
81 
86  void ShallowCopy(vtkAssemblyPath* path);
87 
92  vtkMTimeType GetMTime() override;
93 
99  {
100  return static_cast<vtkAssemblyNode*>(this->GetNextItemAsObject(cookie));
101  }
102 
103 protected:
104  vtkAssemblyPath();
105  ~vtkAssemblyPath() override;
106 
107  void AddNode(vtkAssemblyNode* n); // Internal method adds assembly node
108  vtkTransform* Transform; // Used to perform matrix concatenation
109  vtkProp* TransformedProp; // A transformed prop used to do the rendering
110 
111 private:
112  // hide the standard AddItem from the user and the compiler.
113  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
114 
115  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
116  void operator=(const vtkAssemblyPath&) = delete;
117 };
118 
119 VTK_ABI_NAMESPACE_END
120 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:35
abstract base class for most VTK objects
Definition: vtkObject.h:52
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:50
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 an empty collection.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void AddItem(vtkObject *)
Add given item to the bottom (end) of the collection.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:39
vtkProp * TransformedProp
vtkTransform * Transform
#define VTK_MARSHALAUTO
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.