VTK
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 =========================================================================*/
50 #ifndef vtkQuadricLODActor_h
51 #define vtkQuadricLODActor_h
52 
53 #include "vtkActor.h"
54 #include "vtkRenderingLODModule.h" // For export macro
55 
57 class vtkPolyDataMapper;
58 class vtkCamera;
59 class vtkPolyData;
60 
61 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
62 {
63 public:
67  static vtkQuadricLODActor* New();
68 
70 
73  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
74  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
83  vtkSetMacro(DeferLODConstruction, vtkTypeBool);
84  vtkGetMacro(DeferLODConstruction, vtkTypeBool);
85  vtkBooleanMacro(DeferLODConstruction, vtkTypeBool);
87 
89 
96  vtkSetMacro(Static, vtkTypeBool);
97  vtkGetMacro(Static, vtkTypeBool);
98  vtkBooleanMacro(Static, vtkTypeBool);
100 
102  {
103  UNKNOWN = 0,
110  XYZVOLUME
111  };
112 
114 
127  vtkSetClampMacro(DataConfiguration, int, UNKNOWN, XYZVOLUME);
128  vtkGetMacro(DataConfiguration, int);
129  void SetDataConfigurationToUnknown() { this->SetDataConfiguration(UNKNOWN); }
130  void SetDataConfigurationToXLine() { this->SetDataConfiguration(XLINE); }
131  void SetDataConfigurationToYLine() { this->SetDataConfiguration(YLINE); }
132  void SetDataConfigurationToZLine() { this->SetDataConfiguration(ZLINE); }
133  void SetDataConfigurationToXYPlane() { this->SetDataConfiguration(XYPLANE); }
134  void SetDataConfigurationToYZPlane() { this->SetDataConfiguration(YZPLANE); }
135  void SetDataConfigurationToXZPlane() { this->SetDataConfiguration(XZPLANE); }
136  void SetDataConfigurationToXYZVolume() { this->SetDataConfiguration(XYZVOLUME); }
138 
140 
147  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
148  vtkGetMacro(CollapseDimensionRatio, double);
150 
152 
157  void SetLODFilter(vtkQuadricClustering* lodFilter);
158  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
160 
162  {
163  FOLLOWER = 0,
164  ACTOR
165  };
166 
168 
172  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
173  vtkGetMacro(PropType, int);
174  void SetPropTypeToFollower() { this->SetPropType(FOLLOWER); }
175  void SetPropTypeToActor() { this->SetPropType(ACTOR); }
177 
179 
183  void SetCamera(vtkCamera*);
184  vtkGetObjectMacro(Camera, vtkCamera);
186 
192  void Render(vtkRenderer*, vtkMapper*) override;
193 
198  int RenderOpaqueGeometry(vtkViewport* viewport) override;
199 
205  void ReleaseGraphicsResources(vtkWindow*) override;
206 
210  void ShallowCopy(vtkProp* prop) override;
211 
212 protected:
214  ~vtkQuadricLODActor() override;
215 
216  // Renders the LOD
219 
220  // Keep track of the requested interactive frame rate
222 
223  // Support various strategies
225 
226  // Specify whether the mapper's should be set in to Static mode.
228 
229  // The dimension of the data
232 
233  // Control whether this is a follower or regular actor
234  int PropType;
236 
237  // Specify to defer construction of the LOD.
239 
240  // Keep track of building
242 
243 private:
244  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
245  void operator=(const vtkQuadricLODActor&) = delete;
246 };
247 
248 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:36
vtkQuadricLODActor::BuildTime
vtkTimeStamp BuildTime
Definition: vtkQuadricLODActor.h:241
vtkActor::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkQuadricLODActor::YLINE
Definition: vtkQuadricLODActor.h:105
vtkQuadricLODActor::CachedInteractiveFrameRate
double CachedInteractiveFrameRate
Definition: vtkQuadricLODActor.h:221
vtkQuadricLODActor::DeferLODConstruction
vtkTypeBool DeferLODConstruction
Definition: vtkQuadricLODActor.h:238
vtkQuadricLODActor::PropType
int PropType
Definition: vtkQuadricLODActor.h:234
vtkQuadricLODActor
a specific level-of-detail strategy using the quadric clustering decimation algorithm
Definition: vtkQuadricLODActor.h:61
vtkQuadricLODActor::SetDataConfigurationToUnknown
void SetDataConfigurationToUnknown()
Definition: vtkQuadricLODActor.h:129
vtkQuadricLODActor::SetPropTypeToFollower
void SetPropTypeToFollower()
Definition: vtkQuadricLODActor.h:174
vtkActor::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkQuadricLODActor::SetDataConfigurationToYZPlane
void SetDataConfigurationToYZPlane()
Definition: vtkQuadricLODActor.h:134
vtkQuadricLODActor::SetPropTypeToActor
void SetPropTypeToActor()
Definition: vtkQuadricLODActor.h:175
vtkQuadricLODActor::LODFilter
vtkQuadricClustering * LODFilter
Definition: vtkQuadricLODActor.h:224
vtkActor::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Shallow copy of an actor.
vtkQuadricLODActor::SetDataConfigurationToYLine
void SetDataConfigurationToYLine()
Definition: vtkQuadricLODActor.h:131
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkQuadricLODActor::YZPLANE
Definition: vtkQuadricLODActor.h:109
vtkQuadricLODActor::XZPLANE
Definition: vtkQuadricLODActor.h:108
vtkQuadricLODActor::XYPLANE
Definition: vtkQuadricLODActor.h:107
vtkQuadricLODActor::SetDataConfigurationToZLine
void SetDataConfigurationToZLine()
Definition: vtkQuadricLODActor.h:132
vtkQuadricLODActor::DataConfiguration
int DataConfiguration
Definition: vtkQuadricLODActor.h:231
vtkQuadricLODActor::CollapseDimensionRatio
double CollapseDimensionRatio
Definition: vtkQuadricLODActor.h:230
vtkQuadricLODActor::Static
vtkTypeBool Static
Definition: vtkQuadricLODActor.h:227
vtkQuadricLODActor::SetDataConfigurationToXYPlane
void SetDataConfigurationToXYPlane()
Definition: vtkQuadricLODActor.h:133
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkActor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkActor::New
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,...
vtkQuadricLODActor::SetDataConfigurationToXLine
void SetDataConfigurationToXLine()
Definition: vtkQuadricLODActor.h:130
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:80
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkQuadricClustering
reduce the number of triangles in a mesh
Definition: vtkQuadricClustering.h:96
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:45
vtkActor.h
vtkQuadricLODActor::LODActor
vtkActor * LODActor
Definition: vtkQuadricLODActor.h:217
vtkQuadricLODActor::XLINE
Definition: vtkQuadricLODActor.h:104
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:47
vtkQuadricLODActor::DataConfigurationEnum
DataConfigurationEnum
Definition: vtkQuadricLODActor.h:101
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:58
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkQuadricLODActor::LODMapper
vtkPolyDataMapper * LODMapper
Definition: vtkQuadricLODActor.h:218
vtkQuadricLODActor::PropTypeEnum
PropTypeEnum
Definition: vtkQuadricLODActor.h:161
vtkQuadricLODActor::SetDataConfigurationToXZPlane
void SetDataConfigurationToXZPlane()
Definition: vtkQuadricLODActor.h:135
vtkQuadricLODActor::Camera
vtkCamera * Camera
Definition: vtkQuadricLODActor.h:235
vtkQuadricLODActor::SetDataConfigurationToXYZVolume
void SetDataConfigurationToXYZVolume()
Definition: vtkQuadricLODActor.h:136
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkQuadricLODActor::ZLINE
Definition: vtkQuadricLODActor.h:106
vtkActor::Render
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:87