VTK  9.3.20240328
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
77 #ifndef vtkAssembly_h
78 #define vtkAssembly_h
79 
80 #include "vtkProp3D.h"
81 #include "vtkRenderingCoreModule.h" // For export macro
82 
83 VTK_ABI_NAMESPACE_BEGIN
84 class vtkAssemblyPaths;
86 class vtkMapper;
87 class vtkProperty;
88 class vtkActor;
89 
90 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
91 {
92 public:
93  static vtkAssembly* New();
94 
95  vtkTypeMacro(vtkAssembly, vtkProp3D);
96  void PrintSelf(ostream& os, vtkIndent indent) override;
97 
102 
107 
111  vtkProp3DCollection* GetParts() { return this->Parts; }
112 
114 
119  void GetActors(vtkPropCollection*) override;
120  void GetVolumes(vtkPropCollection*) override;
122 
124 
132  int RenderOpaqueGeometry(vtkViewport* ren) override;
136 
141 
148 
150 
162  void InitPathTraversal() override;
164  int GetNumberOfPaths() override;
166 
170  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
171  double* GetBounds() VTK_SIZEHINT(6) override;
172 
177  vtkMTimeType GetMTime() override;
178 
182  void ShallowCopy(vtkProp* prop) override;
183 
190  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
191 
192 protected:
194  ~vtkAssembly() override;
195 
196  // Keep a list of direct descendants of the assembly hierarchy
198 
199  // Support the BuildPaths() method. Caches last paths built for
200  // performance.
201  vtkTimeStamp PathTime;
202  virtual void UpdatePaths(); // apply transformations and properties recursively
203 
204 private:
205  vtkAssembly(const vtkAssembly&) = delete;
206  void operator=(const vtkAssembly&) = delete;
207 };
208 
209 VTK_ABI_NAMESPACE_END
210 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:150
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:91
vtkProp3DCollection * GetParts()
Return the parts (direct descendants) of this assembly.
Definition: vtkAssembly.h:111
int RenderTranslucentPolygonalGeometry(vtkViewport *ren) override
Render this assembly and all its parts.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkAssemblyPath * GetNextPath() override
Methods to traverse the parts of an assembly.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
int RenderVolumetricGeometry(vtkViewport *ren) override
Render this assembly and all its parts.
int RenderOpaqueGeometry(vtkViewport *ren) override
Render this assembly and all its parts.
int GetNumberOfPaths() override
Methods to traverse the parts of an assembly.
static vtkAssembly * New()
void InitPathTraversal() override
Methods to traverse the parts of an assembly.
void GetVolumes(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
void RemovePart(vtkProp3D *)
Remove a part from the list of parts,.
void GetBounds(double bounds[6])
Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkAssembly.h:170
void AddPart(vtkProp3D *)
Add a part to the list of parts.
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:136
an ordered list of 3D props
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:88
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:65
represent surface properties of a geometric object
Definition: vtkProperty.h:166
record modification and/or execution time
Definition: vtkTimeStamp.h:44
abstract specification for Viewports
Definition: vtkViewport.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_SIZEHINT(...)