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 "vtkRenderingCoreModule.h" // For export macro
61 #include "vtkProp3D.h"
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 
91  { return this->Parts; }
92 
94 
99  void GetActors(vtkPropCollection *) override;
100  void GetVolumes(vtkPropCollection *) override;
102 
104 
112  int RenderOpaqueGeometry(vtkViewport *ren) override;
114  int RenderVolumetricGeometry(vtkViewport *ren) override;
116 
120  int HasTranslucentPolygonalGeometry() override;
121 
127  void ReleaseGraphicsResources(vtkWindow *) override;
128 
130 
142  void InitPathTraversal() override;
143  vtkAssemblyPath *GetNextPath() override;
144  int GetNumberOfPaths() override;
146 
150  void GetBounds(double bounds[6])
151  { this->vtkProp3D::GetBounds( bounds ); }
152  double *GetBounds() VTK_SIZEHINT(6) override;
153 
158  vtkMTimeType GetMTime() override;
159 
163  void ShallowCopy(vtkProp *prop) override;
164 
171  void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path) override;
172 
173 protected:
174  vtkAssembly();
175  ~vtkAssembly() override;
176 
177  // Keep a list of direct descendants of the assembly hierarchy
179 
180  // Support the BuildPaths() method. Caches last paths built for
181  // performance.
182  vtkTimeStamp PathTime;
183  virtual void UpdatePaths(); //apply transformations and properties recursively
184 
185 private:
186  vtkAssembly(const vtkAssembly&) = delete;
187  void operator=(const vtkAssembly&) = delete;
188 };
189 
190 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:46
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:90
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract specification for Viewports
Definition: vtkViewport.h:44
represent surface properties of a geometric object
Definition: vtkProperty.h:60
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:218
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:290
record modification and/or execution time
Definition: vtkTimeStamp.h:32
virtual vtkAssemblyPath * GetNextPath()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g.,...
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:150
an ordered list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:299
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:222
void InitPathTraversal() override
Overload vtkProp's method for setting up assembly paths.
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:59
a list of lists of props representing an assembly hierarchy
an ordered list of 3D props
#define VTK_SIZEHINT(...)
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:80
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:220
virtual int GetNumberOfPaths()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g.,...
Definition: vtkProp.h:149
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
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:57