VTK: Rendering/LOD/vtkQuadricLODActor.h Source File

| 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
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
57 class vtkQuadricClustering;
58 class vtkPolyDataMapper;
59 class vtkCamera;
60 class vtkPolyData;
61
62 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
63 {
64 public:
68 static vtkQuadricLODActor* New();
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
102 enum DataConfigurationEnum
103 {
104 UNKNOWN = 0,
105 XLINE,
106 YLINE,
107 ZLINE,
108 XYPLANE,
109 XZPLANE,
110 YZPLANE,
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
158 void SetLODFilter(vtkQuadricClustering* lodFilter);
159 vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
161
162 enum PropTypeEnum
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
184 void SetCamera(vtkCamera*);
185 vtkGetObjectMacro(Camera, vtkCamera);
187
193 void Render(vtkRenderer*, vtkMapper*) override;
194
200 void ReleaseGraphicsResources(vtkWindow*) override;
201
205 void ShallowCopy(vtkProp* prop) override;
206
207 protected:
208 vtkQuadricLODActor();
209 ~vtkQuadricLODActor() override;
210
211 // Renders the LOD
212 vtkActor* LODActor;
213 vtkPolyDataMapper* LODMapper;
214
215 // Keep track of the requested interactive frame rate
216 double CachedInteractiveFrameRate;
217
218 // Support various strategies
219 vtkQuadricClustering* LODFilter;
220
221 // Specify whether the mapper's should be set in to Static mode.
222 vtkTypeBool Static;
223
224 // The dimension of the data
225 double CollapseDimensionRatio;
226 int DataConfiguration;
227
228 // Control whether this is a follower or regular actor
229 int PropType;
230 vtkCamera* Camera;
231
232 // Specify to defer construction of the LOD.
233 vtkTypeBool DeferLODConstruction;
234
235 // Keep track of building
236 vtkTimeStamp BuildTime;
237
238 private:
239 vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
240 void operator=(const vtkQuadricLODActor&) = delete;
241 };
242
243 VTK_ABI_NAMESPACE_END
244 #endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:86
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:42
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
vtkQuadricClustering
reduce the number of triangles in a mesh
Definition: vtkQuadricClustering.h:103
vtkQuadricLODActor
a specific level-of-detail strategy using the quadric clustering decimation algorithm
Definition: vtkQuadricLODActor.h:63
vtkQuadricLODActor::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Shallow copy of an LOD actor.
vtkQuadricLODActor::SetDataConfigurationToXLine
void SetDataConfigurationToXLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:131
vtkQuadricLODActor::PropTypeEnum
PropTypeEnum
Definition: vtkQuadricLODActor.h:163
vtkQuadricLODActor::BuildTime
vtkTimeStamp BuildTime
Definition: vtkQuadricLODActor.h:236
vtkQuadricLODActor::SetLODFilter
void SetLODFilter(vtkQuadricClustering *lodFilter)
This class will create a vtkQuadricClustering algorithm automatically.
vtkQuadricLODActor::SetCamera
void SetCamera(vtkCamera *)
Set/Get the camera to follow.
vtkQuadricLODActor::SetDataConfigurationToXYZVolume
void SetDataConfigurationToXYZVolume()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:137
vtkQuadricLODActor::SetDataConfigurationToYLine
void SetDataConfigurationToYLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:132
vtkQuadricLODActor::PropType
int PropType
Definition: vtkQuadricLODActor.h:229
vtkQuadricLODActor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods.
vtkQuadricLODActor::SetDataConfigurationToXZPlane
void SetDataConfigurationToXZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:136
vtkQuadricLODActor::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkQuadricLODActor::DataConfigurationEnum
DataConfigurationEnum
Definition: vtkQuadricLODActor.h:103
vtkQuadricLODActor::XZPLANE
@ XZPLANE
Definition: vtkQuadricLODActor.h:109
vtkQuadricLODActor::XLINE
@ XLINE
Definition: vtkQuadricLODActor.h:105
vtkQuadricLODActor::XYPLANE
@ XYPLANE
Definition: vtkQuadricLODActor.h:108
vtkQuadricLODActor::YLINE
@ YLINE
Definition: vtkQuadricLODActor.h:106
vtkQuadricLODActor::YZPLANE
@ YZPLANE
Definition: vtkQuadricLODActor.h:110
vtkQuadricLODActor::ZLINE
@ ZLINE
Definition: vtkQuadricLODActor.h:107
vtkQuadricLODActor::CachedInteractiveFrameRate
double CachedInteractiveFrameRate
Definition: vtkQuadricLODActor.h:216
vtkQuadricLODActor::New
static vtkQuadricLODActor * New()
Creates a vtkQuadricLODActor.
vtkQuadricLODActor::Static
vtkTypeBool Static
Definition: vtkQuadricLODActor.h:222
vtkQuadricLODActor::DataConfiguration
int DataConfiguration
Definition: vtkQuadricLODActor.h:226
vtkQuadricLODActor::DeferLODConstruction
vtkTypeBool DeferLODConstruction
Definition: vtkQuadricLODActor.h:233
vtkQuadricLODActor::CollapseDimensionRatio
double CollapseDimensionRatio
Definition: vtkQuadricLODActor.h:225
vtkQuadricLODActor::SetPropTypeToActor
void SetPropTypeToActor()
Indicate that this actor is actually a follower.
Definition: vtkQuadricLODActor.h:176
vtkQuadricLODActor::SetDataConfigurationToZLine
void SetDataConfigurationToZLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:133
vtkQuadricLODActor::~vtkQuadricLODActor
~vtkQuadricLODActor() override
vtkQuadricLODActor::SetPropTypeToFollower
void SetPropTypeToFollower()
Indicate that this actor is actually a follower.
Definition: vtkQuadricLODActor.h:175
vtkQuadricLODActor::SetDataConfigurationToUnknown
void SetDataConfigurationToUnknown()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:130
vtkQuadricLODActor::vtkQuadricLODActor
vtkQuadricLODActor()
vtkQuadricLODActor::LODActor
vtkActor * LODActor
Definition: vtkQuadricLODActor.h:212
vtkQuadricLODActor::LODFilter
vtkQuadricClustering * LODFilter
Definition: vtkQuadricLODActor.h:219
vtkQuadricLODActor::LODMapper
vtkPolyDataMapper * LODMapper
Definition: vtkQuadricLODActor.h:213
vtkQuadricLODActor::SetDataConfigurationToYZPlane
void SetDataConfigurationToYZPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:135
vtkQuadricLODActor::Render
void Render(vtkRenderer *, vtkMapper *) override
This causes the actor to be rendered.
vtkQuadricLODActor::SetDataConfigurationToXYPlane
void SetDataConfigurationToXYPlane()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
Definition: vtkQuadricLODActor.h:134
vtkQuadricLODActor::Camera
vtkCamera * Camera
Definition: vtkQuadricLODActor.h:230
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkIOSSUtilities::UNKNOWN
@ UNKNOWN
Definition: vtkIOSSUtilities.h:55
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkActor.h