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 =========================================================================*/
63 #ifndef vtkAssembly_h
64 #define vtkAssembly_h
65 
66 #include "vtkRenderingCoreModule.h" // For export macro
67 #include "vtkProp3D.h"
68 
69 class vtkAssemblyPaths;
71 class vtkMapper;
72 class vtkProperty;
73 class vtkActor;
74 
75 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
76 {
77 public:
78  static vtkAssembly *New();
79 
80  vtkTypeMacro(vtkAssembly, vtkProp3D);
81  void PrintSelf(ostream& os, vtkIndent indent) override;
82 
86  void AddPart(vtkProp3D *);
87 
92 
97  { return this->Parts; }
98 
100 
105  void GetActors(vtkPropCollection *) override;
106  void GetVolumes(vtkPropCollection *) override;
108 
110 
118  int RenderOpaqueGeometry(vtkViewport *ren) override;
122 
127 
134 
136 
148  void InitPathTraversal() override;
150  int GetNumberOfPaths() override;
152 
156  void GetBounds(double bounds[6])
157  { this->vtkProp3D::GetBounds( bounds ); }
158  double *GetBounds() VTK_SIZEHINT(6) override;
159 
164  vtkMTimeType GetMTime() override;
165 
169  void ShallowCopy(vtkProp *prop) override;
170 
177  void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path) override;
178 
179 protected:
181  ~vtkAssembly() override;
182 
183  // Keep a list of direct descendants of the assembly hierarchy
185 
186  // Support the BuildPaths() method. Caches last paths built for
187  // performance.
188  vtkTimeStamp PathTime;
189  virtual void UpdatePaths(); //apply transformations and properties recursively
190 
191 private:
192  vtkAssembly(const vtkAssembly&) = delete;
193  void operator=(const vtkAssembly&) = delete;
194 };
195 
196 #endif
vtkAssembly::GetNumberOfPaths
int GetNumberOfPaths() override
vtkAssembly::GetNextPath
vtkAssemblyPath * GetNextPath() override
vtkAssembly::GetParts
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:96
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkAssembly::GetVolumes
void GetVolumes(vtkPropCollection *) override
vtkAssembly::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkAssembly::GetActors
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
vtkAssemblyPath
a list of nodes that form an assembly path
Definition: vtkAssemblyPath.h:45
vtkAssemblyPaths
a list of lists of props representing an assembly hierarchy
Definition: vtkAssemblyPaths.h:38
vtkAssembly::New
static vtkAssembly * New()
vtkProp3D::GetBounds
double * GetBounds() override=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkAssembly::RemovePart
void RemovePart(vtkProp3D *)
Remove a part from the list of parts,.
vtkAssembly::AddPart
void AddPart(vtkProp3D *)
Add a part to the list of parts.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkAssembly::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *ren) override
vtkAssembly::RenderVolumetricGeometry
int RenderVolumetricGeometry(vtkViewport *ren) override
vtkAssembly::GetBounds
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:156
vtkAssembly::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkAssembly::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:87
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAssembly::InitPathTraversal
void InitPathTraversal() override
Methods to traverse the parts of an assembly.
vtkAssembly::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *ren) override
Render this assembly and all its parts.
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:67
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:42
vtkProp3DCollection
an ordered list of 3D props
Definition: vtkProp3DCollection.h:38
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAssembly::GetBounds
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkProp3D.h
vtkAssembly
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:76