VTK  9.0.20201202
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 =========================================================================*/
30 #ifndef vtkAssemblyPath_h
31 #define vtkAssemblyPath_h
32 
33 #include "vtkAssemblyNode.h" // used for inlines
34 #include "vtkCollection.h"
35 #include "vtkRenderingCoreModule.h" // For export macro
36 
37 class vtkMatrix4x4;
38 class vtkTransform;
39 class vtkProp;
40 
41 class VTKRENDERINGCORE_EXPORT vtkAssemblyPath : public vtkCollection
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
50  static vtkAssemblyPath* New();
51 
58  void AddNode(vtkProp* p, vtkMatrix4x4* m);
59 
68  vtkAssemblyNode* GetNextNode();
69 
75  vtkAssemblyNode* GetFirstNode();
76 
81  vtkAssemblyNode* GetLastNode();
82 
87  void DeleteLastNode();
88 
93  void ShallowCopy(vtkAssemblyPath* path);
94 
99  vtkMTimeType GetMTime() override;
100 
106  {
107  return static_cast<vtkAssemblyNode*>(this->GetNextItemAsObject(cookie));
108  }
109 
110 protected:
111  vtkAssemblyPath();
112  ~vtkAssemblyPath() override;
113 
114  void AddNode(vtkAssemblyNode* n); // Internal method adds assembly node
115  vtkTransform* Transform; // Used to perform matrix concatenation
116  vtkProp* TransformedProp; // A transformed prop used to do the rendering
117 
118 private:
119  // hide the standard AddItem from the user and the compiler.
120  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
121 
122 private:
123  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
124  void operator=(const vtkAssemblyPath&) = delete;
125 };
126 
127 #endif
vtkAssemblyNode.h
vtkCollection::New
static vtkCollection * New()
Construct with empty list.
vtkAssemblyNode
represent a node in an assembly
Definition: vtkAssemblyNode.h:55
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48
vtkAssemblyPath::Transform
vtkTransform * Transform
Definition: vtkAssemblyPath.h:115
vtkCollection.h
vtkAssemblyPath::GetNextNode
vtkAssemblyNode * GetNextNode(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkAssemblyPath.h:105
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkAssemblyPath::TransformedProp
vtkProp * TransformedProp
Definition: vtkAssemblyPath.h:116
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
vtkAssemblyPath
a list of nodes that form an assembly path
Definition: vtkAssemblyPath.h:41
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:179
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:52
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:285