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 =========================================================================*/
53 #ifndef vtkQuadricLODActor_h
54 #define vtkQuadricLODActor_h
55 
56 #include "vtkRenderingLODModule.h" // For export macro
57 #include "vtkActor.h"
58 
60 class vtkPolyDataMapper;
61 class vtkCamera;
62 class vtkPolyData;
63 
64 class VTKRENDERINGLOD_EXPORT vtkQuadricLODActor : public vtkActor
65 {
66 public:
70  static vtkQuadricLODActor *New();
71 
73 
76  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
86  vtkSetMacro(DeferLODConstruction, vtkTypeBool);
87  vtkGetMacro(DeferLODConstruction, vtkTypeBool);
88  vtkBooleanMacro(DeferLODConstruction, vtkTypeBool);
90 
92 
99  vtkSetMacro(Static, vtkTypeBool);
100  vtkGetMacro(Static, vtkTypeBool);
101  vtkBooleanMacro(Static, vtkTypeBool);
103 
105  {
106  UNKNOWN = 0,
107  XLINE, YLINE, ZLINE,
108  XYPLANE, XZPLANE, YZPLANE,
109  XYZVOLUME
110  };
111 
113 
126  vtkSetClampMacro(DataConfiguration, int, UNKNOWN,XYZVOLUME);
127  vtkGetMacro(DataConfiguration, int);
129  { this->SetDataConfiguration(UNKNOWN); }
131  { this->SetDataConfiguration(XLINE); }
133  { this->SetDataConfiguration(YLINE); }
135  { this->SetDataConfiguration(ZLINE); }
137  { this->SetDataConfiguration(XYPLANE); }
139  { this->SetDataConfiguration(YZPLANE); }
141  { this->SetDataConfiguration(XZPLANE); }
143  { this->SetDataConfiguration(XYZVOLUME); }
145 
147 
154  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
155  vtkGetMacro(CollapseDimensionRatio, double);
157 
159 
164  void SetLODFilter(vtkQuadricClustering *lodFilter);
165  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
167 
169  {
170  FOLLOWER = 0,
171  ACTOR
172  };
173 
175 
179  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
180  vtkGetMacro(PropType, int);
182  { this->SetPropType(FOLLOWER); }
184  { this->SetPropType(ACTOR); }
186 
188 
192  void SetCamera(vtkCamera*);
193  vtkGetObjectMacro(Camera, vtkCamera);
195 
201  void Render(vtkRenderer *, vtkMapper *) override;
202 
207  int RenderOpaqueGeometry(vtkViewport *viewport) override;
208 
214  void ReleaseGraphicsResources(vtkWindow *) override;
215 
219  void ShallowCopy(vtkProp *prop) override;
220 
221 protected:
223  ~vtkQuadricLODActor() override;
224 
225  // Renders the LOD
228 
229  // Keep track of the requested interactive frame rate
231 
232  // Support various strategies
234 
235  // Specify whether the mapper's should be set in to Static mode.
237 
238  // The dimension of the data
241 
242  // Control whether this is a follower or regular actor
243  int PropType;
245 
246  // Specify to defer construction of the LOD.
248 
249  // Keep track of building
251 
252 private:
253  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
254  void operator=(const vtkQuadricLODActor&) = delete;
255 };
256 
257 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:90
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:51
abstract specification for Viewports
Definition: vtkViewport.h:47
record modification and/or execution time
Definition: vtkTimeStamp.h:35
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:63
vtkQuadricClustering * LODFilter
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
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:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
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:86
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...
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
a specific level-of-detail strategy using the quadric clustering decimation algorithm ...
reduce the number of triangles in a mesh