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
71class vtkMapper;
72class vtkProperty;
73class vtkActor;
74
75class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
76{
77public:
78 static vtkAssembly *New();
79
80 vtkTypeMacro(vtkAssembly, vtkProp3D);
81 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
82
87
92
97 { return this->Parts; }
98
100
105 void GetActors(vtkPropCollection *) VTK_OVERRIDE;
106 void GetVolumes(vtkPropCollection *) VTK_OVERRIDE;
108
110
118 int RenderOpaqueGeometry(vtkViewport *ren) VTK_OVERRIDE;
119 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *ren) VTK_OVERRIDE;
120 virtual int RenderVolumetricGeometry(vtkViewport *ren) VTK_OVERRIDE;
122
126 virtual int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
127
133 void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
134
136
148 void InitPathTraversal() VTK_OVERRIDE;
149 vtkAssemblyPath *GetNextPath() VTK_OVERRIDE;
150 int GetNumberOfPaths() VTK_OVERRIDE;
152
156 void GetBounds(double bounds[6])
157 { this->vtkProp3D::GetBounds( bounds ); }
158 double *GetBounds() VTK_OVERRIDE;
159
164 vtkMTimeType GetMTime() VTK_OVERRIDE;
165
169 void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
170
177 void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path) VTK_OVERRIDE;
178
179protected:
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
191private:
192 vtkAssembly(const vtkAssembly&) VTK_DELETE_FUNCTION;
193 void operator=(const vtkAssembly&) VTK_DELETE_FUNCTION;
194};
195
196#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
a list of nodes that form an assembly path
a list of lists of props representing an assembly hierarchy
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:76
static vtkAssembly * New()
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
virtual int RenderVolumetricGeometry(vtkViewport *ren) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
int RenderOpaqueGeometry(vtkViewport *ren) override
Render this assembly and all its parts.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *ren) override
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:96
virtual int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
void GetVolumes(vtkPropCollection *) override
void RemovePart(vtkProp3D *)
Remove a part from the list of parts,.
void AddPart(vtkProp3D *)
Add a part to the list of parts.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
a list of 3D props
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
virtual double * GetBounds()=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
a list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
represent surface properties of a geometric object
Definition: vtkProperty.h:65
record modification and/or execution time
Definition: vtkTimeStamp.h:36
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248