VTK  9.2.20230320
vtkQuadricLODActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadricLODActor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
72 #ifndef vtkQuadricLODActor_h
73 #define vtkQuadricLODActor_h
74 
75 #include "vtkActor.h"
76 #include "vtkRenderingLODModule.h" // For export macro
77 
78 VTK_ABI_NAMESPACE_BEGIN
80 class vtkPolyDataMapper;
81 class vtkCamera;
82 class vtkPolyData;
83 
84 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
85 {
86 public:
91 
93 
96  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
97  void PrintSelf(ostream& os, vtkIndent indent) override;
99 
101 
106  vtkSetMacro(DeferLODConstruction, vtkTypeBool);
107  vtkGetMacro(DeferLODConstruction, vtkTypeBool);
108  vtkBooleanMacro(DeferLODConstruction, vtkTypeBool);
110 
112 
119  vtkSetMacro(Static, vtkTypeBool);
120  vtkGetMacro(Static, vtkTypeBool);
121  vtkBooleanMacro(Static, vtkTypeBool);
123 
125  {
126  UNKNOWN = 0,
133  XYZVOLUME
134  };
135 
137 
150  vtkSetClampMacro(DataConfiguration, int, UNKNOWN, XYZVOLUME);
151  vtkGetMacro(DataConfiguration, int);
152  void SetDataConfigurationToUnknown() { this->SetDataConfiguration(UNKNOWN); }
153  void SetDataConfigurationToXLine() { this->SetDataConfiguration(XLINE); }
154  void SetDataConfigurationToYLine() { this->SetDataConfiguration(YLINE); }
155  void SetDataConfigurationToZLine() { this->SetDataConfiguration(ZLINE); }
156  void SetDataConfigurationToXYPlane() { this->SetDataConfiguration(XYPLANE); }
157  void SetDataConfigurationToYZPlane() { this->SetDataConfiguration(YZPLANE); }
158  void SetDataConfigurationToXZPlane() { this->SetDataConfiguration(XZPLANE); }
159  void SetDataConfigurationToXYZVolume() { this->SetDataConfiguration(XYZVOLUME); }
161 
163 
170  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
171  vtkGetMacro(CollapseDimensionRatio, double);
173 
175 
181  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
183 
185  {
186  FOLLOWER = 0,
187  ACTOR
188  };
189 
191 
195  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
196  vtkGetMacro(PropType, int);
197  void SetPropTypeToFollower() { this->SetPropType(FOLLOWER); }
198  void SetPropTypeToActor() { this->SetPropType(ACTOR); }
200 
202 
207  vtkGetObjectMacro(Camera, vtkCamera);
209 
215  void Render(vtkRenderer*, vtkMapper*) override;
216 
223 
227  void ShallowCopy(vtkProp* prop) override;
228 
229 protected:
232 
233  // Renders the LOD
236 
237  // Keep track of the requested interactive frame rate
239 
240  // Support various strategies
242 
243  // Specify whether the mapper's should be set in to Static mode.
245 
246  // The dimension of the data
249 
250  // Control whether this is a follower or regular actor
251  int PropType;
253 
254  // Specify to defer construction of the LOD.
256 
257  // Keep track of building
259 
260 private:
261  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
262  void operator=(const vtkQuadricLODActor&) = delete;
263 };
264 
265 VTK_ABI_NAMESPACE_END
266 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:162
a virtual camera for 3D rendering
Definition: vtkCamera.h:162
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:178
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:201
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:77
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:183
record modification and/or execution time
Definition: vtkTimeStamp.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40
int vtkTypeBool
Definition: vtkABI.h:71