VTK
vtkAssembly.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAssembly.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 =========================================================================*/
57 #ifndef vtkAssembly_h
58 #define vtkAssembly_h
59 
60 #include "vtkProp3D.h"
61 #include "vtkRenderingCoreModule.h" // For export macro
62 
63 class vtkAssemblyPaths;
65 class vtkMapper;
66 class vtkProperty;
67 class vtkActor;
68 
69 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
70 {
71 public:
72  static vtkAssembly* New();
73 
74  vtkTypeMacro(vtkAssembly, vtkProp3D);
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
80  void AddPart(vtkProp3D*);
81 
85  void RemovePart(vtkProp3D*);
86 
90  vtkProp3DCollection* GetParts() { return this->Parts; }
91 
93 
98  void GetActors(vtkPropCollection*) override;
99  void GetVolumes(vtkPropCollection*) override;
101 
103 
111  int RenderOpaqueGeometry(vtkViewport* ren) override;
113  int RenderVolumetricGeometry(vtkViewport* ren) override;
115 
120 
126  void ReleaseGraphicsResources(vtkWindow*) override;
127 
129 
141  void InitPathTraversal() override;
142  vtkAssemblyPath* GetNextPath() override;
143  int GetNumberOfPaths() override;
145 
149  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
150  double* GetBounds() VTK_SIZEHINT(6) override;
151 
156  vtkMTimeType GetMTime() override;
157 
161  void ShallowCopy(vtkProp* prop) override;
162 
169  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
170 
171 protected:
172  vtkAssembly();
173  ~vtkAssembly() override;
174 
175  // Keep a list of direct descendants of the assembly hierarchy
177 
178  // Support the BuildPaths() method. Caches last paths built for
179  // performance.
180  vtkTimeStamp PathTime;
181  virtual void UpdatePaths(); // apply transformations and properties recursively
182 
183 private:
184  vtkAssembly(const vtkAssembly&) = delete;
185  void operator=(const vtkAssembly&) = delete;
186 };
187 
188 #endif
vtkAssembly::GetParts
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:90
vtkProp::GetNextPath
virtual vtkAssemblyPath * GetNextPath()
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkProp3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkProp::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:215
vtkAssemblyPath
a list of nodes that form an assembly path
Definition: vtkAssemblyPath.h:41
vtkAssemblyPaths
a list of lists of props representing an assembly hierarchy
Definition: vtkAssemblyPaths.h:37
vtkProp3D::GetBounds
double * GetBounds() override=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkProp::GetVolumes
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:60
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkProp::HasTranslucentPolygonalGeometry
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:279
vtkAssembly::GetBounds
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:149
vtkProp::RenderVolumetricGeometry
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:217
vtkProp::GetActors
virtual void GetActors(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors or volumes.
Definition: vtkProp.h:58
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkProp3D::InitPathTraversal
void InitPathTraversal() override
Overload vtkProp's method for setting up assembly paths.
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:80
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkProp::GetNumberOfPaths
virtual int GetNumberOfPaths()
Definition: vtkProp.h:148
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkProp::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:216
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:47
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:61
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkProp::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:300
vtkProp3DCollection
an ordered list of 3D props
Definition: vtkProp3DCollection.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:304
vtkProp3D.h
vtkAssembly
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:69