VTK
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 =========================================================================*/
33 #ifndef vtkAssemblyPath_h
34 #define vtkAssemblyPath_h
35 
36 #include "vtkRenderingCoreModule.h" // For export macro
37 #include "vtkCollection.h"
38 #include "vtkAssemblyNode.h" // used for inlines
39 
40 class vtkMatrix4x4;
41 class vtkTransform;
42 class vtkProp;
43 
44 class VTKRENDERINGCORE_EXPORT vtkAssemblyPath : public vtkCollection
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
53  static vtkAssemblyPath *New();
54 
61  void AddNode(vtkProp *p, vtkMatrix4x4 *m);
62 
71  vtkAssemblyNode *GetNextNode();
72 
78  vtkAssemblyNode *GetFirstNode();
79 
84  vtkAssemblyNode *GetLastNode();
85 
90  void DeleteLastNode();
91 
96  void ShallowCopy(vtkAssemblyPath *path);
97 
102  vtkMTimeType GetMTime() override;
103 
109  { return static_cast<vtkAssemblyNode *>(this->GetNextItemAsObject(cookie)); }
110 
111 protected:
112  vtkAssemblyPath();
113  ~vtkAssemblyPath() override;
114 
115  void AddNode(vtkAssemblyNode *n); //Internal method adds assembly node
116  vtkTransform *Transform; //Used to perform matrix concatenation
117  vtkProp *TransformedProp; //A transformed prop used to do the rendering
118 
119 private:
120  // hide the standard AddItem from the user and the compiler.
121  void AddItem(vtkObject *o)
122  { this->vtkCollection::AddItem(o); }
123 
124 private:
125  vtkAssemblyPath(const vtkAssemblyPath&) = delete;
126  void operator=(const vtkAssemblyPath&) = delete;
127 };
128 
129 #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:47
vtkAssemblyPath::Transform
vtkTransform * Transform
Definition: vtkAssemblyPath.h:116
vtkCollection.h
vtkAssemblyPath::GetNextNode
vtkAssemblyNode * GetNextNode(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkAssemblyPath.h:108
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkAssemblyPath::TransformedProp
vtkProp * TransformedProp
Definition: vtkAssemblyPath.h:117
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
vtkAssemblyPath
a list of nodes that form an assembly path
Definition: vtkAssemblyPath.h:44
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:177
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
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:304