VTK  9.3.1
vtkAssembly.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
48 #ifndef vtkAssembly_h
49 #define vtkAssembly_h
50 
51 #include "vtkProp3D.h"
52 #include "vtkRenderingCoreModule.h" // For export macro
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkAssemblyPaths;
57 class vtkMapper;
58 class vtkProperty;
59 class vtkActor;
60 
61 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
62 {
63 public:
64  static vtkAssembly* New();
65 
66  vtkTypeMacro(vtkAssembly, vtkProp3D);
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
72  void AddPart(vtkProp3D*);
73 
77  void RemovePart(vtkProp3D*);
78 
82  vtkProp3DCollection* GetParts() { return this->Parts; }
83 
85 
90  void GetActors(vtkPropCollection*) override;
91  void GetVolumes(vtkPropCollection*) override;
93 
95 
103  int RenderOpaqueGeometry(vtkViewport* ren) override;
105  int RenderVolumetricGeometry(vtkViewport* ren) override;
107 
112 
118  void ReleaseGraphicsResources(vtkWindow*) override;
119 
121 
133  void InitPathTraversal() override;
134  vtkAssemblyPath* GetNextPath() override;
135  int GetNumberOfPaths() override;
137 
141  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
142  double* GetBounds() VTK_SIZEHINT(6) override;
143 
148  vtkMTimeType GetMTime() override;
149 
153  void ShallowCopy(vtkProp* prop) override;
154 
161  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
162 
163 protected:
164  vtkAssembly();
165  ~vtkAssembly() override;
166 
167  // Keep a list of direct descendants of the assembly hierarchy
169 
170  // Support the BuildPaths() method. Caches last paths built for
171  // performance.
172  vtkTimeStamp PathTime;
173  virtual void UpdatePaths(); // apply transformations and properties recursively
174 
175 private:
176  vtkAssembly(const vtkAssembly&) = delete;
177  void operator=(const vtkAssembly&) = delete;
178 };
179 
180 VTK_ABI_NAMESPACE_END
181 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:82
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract specification for Viewports
Definition: vtkViewport.h:44
represent surface properties of a geometric object
Definition: vtkProperty.h:56
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:213
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:277
record modification and/or execution time
Definition: vtkTimeStamp.h:24
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:38
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:141
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:298
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:215
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:28
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:58
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:76
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:61
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:214
virtual int GetNumberOfPaths()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
Definition: vtkProp.h:146
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:56