VTK  9.3.1
vtkQuadricLODActor.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
41 #ifndef vtkQuadricLODActor_h
42 #define vtkQuadricLODActor_h
43 
44 #include "vtkActor.h"
45 #include "vtkRenderingLODModule.h" // For export macro
46 
47 VTK_ABI_NAMESPACE_BEGIN
49 class vtkPolyDataMapper;
50 class vtkCamera;
51 class vtkPolyData;
52 
53 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
54 {
55 public:
59  static vtkQuadricLODActor* New();
60 
62 
65  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
66  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
70 
75  vtkSetMacro(DeferLODConstruction, vtkTypeBool);
76  vtkGetMacro(DeferLODConstruction, vtkTypeBool);
77  vtkBooleanMacro(DeferLODConstruction, vtkTypeBool);
79 
81 
88  vtkSetMacro(Static, vtkTypeBool);
89  vtkGetMacro(Static, vtkTypeBool);
90  vtkBooleanMacro(Static, vtkTypeBool);
92 
94  {
95  UNKNOWN = 0,
102  XYZVOLUME
103  };
104 
106 
119  vtkSetClampMacro(DataConfiguration, int, UNKNOWN, XYZVOLUME);
120  vtkGetMacro(DataConfiguration, int);
121  void SetDataConfigurationToUnknown() { this->SetDataConfiguration(UNKNOWN); }
122  void SetDataConfigurationToXLine() { this->SetDataConfiguration(XLINE); }
123  void SetDataConfigurationToYLine() { this->SetDataConfiguration(YLINE); }
124  void SetDataConfigurationToZLine() { this->SetDataConfiguration(ZLINE); }
125  void SetDataConfigurationToXYPlane() { this->SetDataConfiguration(XYPLANE); }
126  void SetDataConfigurationToYZPlane() { this->SetDataConfiguration(YZPLANE); }
127  void SetDataConfigurationToXZPlane() { this->SetDataConfiguration(XZPLANE); }
128  void SetDataConfigurationToXYZVolume() { this->SetDataConfiguration(XYZVOLUME); }
130 
132 
139  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
140  vtkGetMacro(CollapseDimensionRatio, double);
142 
144 
149  void SetLODFilter(vtkQuadricClustering* lodFilter);
150  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
152 
154  {
155  FOLLOWER = 0,
156  ACTOR
157  };
158 
160 
164  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
165  vtkGetMacro(PropType, int);
166  void SetPropTypeToFollower() { this->SetPropType(FOLLOWER); }
167  void SetPropTypeToActor() { this->SetPropType(ACTOR); }
169 
171 
175  void SetCamera(vtkCamera*);
176  vtkGetObjectMacro(Camera, vtkCamera);
178 
184  void Render(vtkRenderer*, vtkMapper*) override;
185 
191  void ReleaseGraphicsResources(vtkWindow*) override;
192 
196  void ShallowCopy(vtkProp* prop) override;
197 
198 protected:
200  ~vtkQuadricLODActor() override;
201 
202  // Renders the LOD
205 
206  // Keep track of the requested interactive frame rate
208 
209  // Support various strategies
211 
212  // Specify whether the mapper's should be set in to Static mode.
214 
215  // The dimension of the data
218 
219  // Control whether this is a follower or regular actor
220  int PropType;
222 
223  // Specify to defer construction of the LOD.
225 
226  // Keep track of building
228 
229 private:
230  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
231  void operator=(const vtkQuadricLODActor&) = delete;
232 };
233 
234 VTK_ABI_NAMESPACE_END
235 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:82
void SetDataConfigurationToYZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
record modification and/or execution time
Definition: vtkTimeStamp.h:24
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ShallowCopy(vtkProp *prop) override
Shallow copy of an actor.
abstract specification for renderers
Definition: vtkRenderer.h:61
vtkQuadricClustering * LODFilter
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
void SetPropTypeToFollower()
Indicate that this actor is actually a follower.
vtkPolyDataMapper * LODMapper
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
void SetDataConfigurationToXYZVolume()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetDataConfigurationToXYPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
void SetPropTypeToActor()
Indicate that this actor is actually a follower.
vtkTypeBool DeferLODConstruction
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:76
map vtkPolyData to graphics primitives
void SetDataConfigurationToXLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetDataConfigurationToYLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetDataConfigurationToZLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetDataConfigurationToXZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetDataConfigurationToUnknown()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
a specific level-of-detail strategy using the quadric clustering decimation algorithm ...
reduce the number of triangles in a mesh