VTK  9.3.0
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
50 #ifndef vtkQuadricLODActor_h
51 #define vtkQuadricLODActor_h
52 
53 #include "vtkActor.h"
54 #include "vtkRenderingLODModule.h" // For export macro
55 
56 VTK_ABI_NAMESPACE_BEGIN
58 class vtkPolyDataMapper;
59 class vtkCamera;
60 class vtkPolyData;
61 
62 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
63 {
64 public:
69 
71 
74  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
75  void PrintSelf(ostream& os, vtkIndent indent) override;
77 
79 
84  vtkSetMacro(DeferLODConstruction, vtkTypeBool);
85  vtkGetMacro(DeferLODConstruction, vtkTypeBool);
86  vtkBooleanMacro(DeferLODConstruction, vtkTypeBool);
88 
90 
97  vtkSetMacro(Static, vtkTypeBool);
98  vtkGetMacro(Static, vtkTypeBool);
99  vtkBooleanMacro(Static, vtkTypeBool);
101 
103  {
104  UNKNOWN = 0,
111  XYZVOLUME
112  };
113 
115 
128  vtkSetClampMacro(DataConfiguration, int, UNKNOWN, XYZVOLUME);
129  vtkGetMacro(DataConfiguration, int);
130  void SetDataConfigurationToUnknown() { this->SetDataConfiguration(UNKNOWN); }
131  void SetDataConfigurationToXLine() { this->SetDataConfiguration(XLINE); }
132  void SetDataConfigurationToYLine() { this->SetDataConfiguration(YLINE); }
133  void SetDataConfigurationToZLine() { this->SetDataConfiguration(ZLINE); }
134  void SetDataConfigurationToXYPlane() { this->SetDataConfiguration(XYPLANE); }
135  void SetDataConfigurationToYZPlane() { this->SetDataConfiguration(YZPLANE); }
136  void SetDataConfigurationToXZPlane() { this->SetDataConfiguration(XZPLANE); }
137  void SetDataConfigurationToXYZVolume() { this->SetDataConfiguration(XYZVOLUME); }
139 
141 
148  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
149  vtkGetMacro(CollapseDimensionRatio, double);
151 
153 
159  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
161 
163  {
164  FOLLOWER = 0,
165  ACTOR
166  };
167 
169 
173  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
174  vtkGetMacro(PropType, int);
175  void SetPropTypeToFollower() { this->SetPropType(FOLLOWER); }
176  void SetPropTypeToActor() { this->SetPropType(ACTOR); }
178 
180 
185  vtkGetObjectMacro(Camera, vtkCamera);
187 
193  void Render(vtkRenderer*, vtkMapper*) override;
194 
201 
205  void ShallowCopy(vtkProp* prop) override;
206 
207 protected:
210 
211  // Renders the LOD
214 
215  // Keep track of the requested interactive frame rate
217 
218  // Support various strategies
220 
221  // Specify whether the mapper's should be set in to Static mode.
223 
224  // The dimension of the data
227 
228  // Control whether this is a follower or regular actor
229  int PropType;
231 
232  // Specify to defer construction of the LOD.
234 
235  // Keep track of building
237 
238 private:
239  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
240  void operator=(const vtkQuadricLODActor&) = delete;
241 };
242 
243 VTK_ABI_NAMESPACE_END
244 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:86
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
reduce the number of triangles in a mesh
a specific level-of-detail strategy using the quadric clustering decimation algorithm
void ShallowCopy(vtkProp *prop) override
Shallow copy of an LOD actor.
void SetDataConfigurationToXLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void SetLODFilter(vtkQuadricClustering *lodFilter)
This class will create a vtkQuadricClustering algorithm automatically.
void SetCamera(vtkCamera *)
Set/Get the camera to follow.
void SetDataConfigurationToXYZVolume()
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 PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods.
void SetDataConfigurationToXZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
static vtkQuadricLODActor * New()
Creates a vtkQuadricLODActor.
vtkTypeBool DeferLODConstruction
void SetPropTypeToActor()
Indicate that this actor is actually a follower.
void SetDataConfigurationToZLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
~vtkQuadricLODActor() override
void SetPropTypeToFollower()
Indicate that this actor is actually a follower.
void SetDataConfigurationToUnknown()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
vtkQuadricClustering * LODFilter
vtkPolyDataMapper * LODMapper
void SetDataConfigurationToYZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
void Render(vtkRenderer *, vtkMapper *) override
This causes the actor to be rendered.
void SetDataConfigurationToXYPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
abstract specification for renderers
Definition: vtkRenderer.h:71
record modification and/or execution time
Definition: vtkTimeStamp.h:34
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int vtkTypeBool
Definition: vtkABI.h:64