VTK  9.2.6
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 =========================================================================*/
60 #ifndef vtkAssembly_h
61 #define vtkAssembly_h
62 
63 #include "vtkProp3D.h"
64 #include "vtkRenderingCoreModule.h" // For export macro
65 
66 class vtkAssemblyPaths;
68 class vtkMapper;
69 class vtkProperty;
70 class vtkActor;
71 
72 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
73 {
74 public:
75  static vtkAssembly* New();
76 
77  vtkTypeMacro(vtkAssembly, vtkProp3D);
78  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
83  void AddPart(vtkProp3D*);
84 
88  void RemovePart(vtkProp3D*);
89 
93  vtkProp3DCollection* GetParts() { return this->Parts; }
94 
96 
101  void GetActors(vtkPropCollection*) override;
102  void GetVolumes(vtkPropCollection*) override;
104 
106 
114  int RenderOpaqueGeometry(vtkViewport* ren) override;
116  int RenderVolumetricGeometry(vtkViewport* ren) override;
118 
123 
129  void ReleaseGraphicsResources(vtkWindow*) override;
130 
132 
144  void InitPathTraversal() override;
145  vtkAssemblyPath* GetNextPath() override;
146  int GetNumberOfPaths() override;
148 
152  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
153  double* GetBounds() VTK_SIZEHINT(6) override;
154 
159  vtkMTimeType GetMTime() override;
160 
164  void ShallowCopy(vtkProp* prop) override;
165 
172  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
173 
174 protected:
175  vtkAssembly();
176  ~vtkAssembly() override;
177 
178  // Keep a list of direct descendants of the assembly hierarchy
180 
181  // Support the BuildPaths() method. Caches last paths built for
182  // performance.
183  vtkTimeStamp PathTime;
184  virtual void UpdatePaths(); // apply transformations and properties recursively
185 
186 private:
187  vtkAssembly(const vtkAssembly&) = delete;
188  void operator=(const vtkAssembly&) = delete;
189 };
190 
191 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:93
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
abstract specification for Viewports
Definition: vtkViewport.h:55
represent surface properties of a geometric object
Definition: vtkProperty.h:67
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:224
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:288
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual vtkAssemblyPath * GetNextPath()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:49
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:152
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:69
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:309
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:226
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:39
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:69
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:87
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:72
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:225
virtual int GetNumberOfPaths()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
Definition: vtkProp.h:157
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:67