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 =========================================================================*/
52 #ifndef vtkQuadricLODActor_h
53 #define vtkQuadricLODActor_h
54 
55 #include "vtkRenderingLODModule.h" // For export macro
56 #include "vtkActor.h"
57 
59 class vtkPolyDataMapper;
60 class vtkCamera;
61 class vtkPolyData;
62 
64 {
65 public:
67  static vtkQuadricLODActor *New();
68 
70 
71  vtkTypeMacro(vtkQuadricLODActor, vtkActor);
72  void PrintSelf(ostream& os, vtkIndent indent);
74 
76 
80  vtkSetMacro(DeferLODConstruction, int);
81  vtkGetMacro(DeferLODConstruction, int);
82  vtkBooleanMacro(DeferLODConstruction, int);
84 
86 
91  vtkSetMacro(Static, int);
92  vtkGetMacro(Static, int);
93  vtkBooleanMacro(Static, int);
95 
96 //BTX
98  {
99  UNKNOWN = 0,
100  XLINE, YLINE, ZLINE,
101  XYPLANE, XZPLANE, YZPLANE,
102  XYZVOLUME
103  };
104 //ETX
106 
117  vtkSetClampMacro(DataConfiguration, int, UNKNOWN,XYZVOLUME);
118  vtkGetMacro(DataConfiguration, int);
120  { this->SetDataConfiguration(UNKNOWN); }
122  { this->SetDataConfiguration(XLINE); }
124  { this->SetDataConfiguration(YLINE); }
126  { this->SetDataConfiguration(ZLINE); }
128  { this->SetDataConfiguration(XYPLANE); }
130  { this->SetDataConfiguration(YZPLANE); }
132  { this->SetDataConfiguration(XZPLANE); }
134  { this->SetDataConfiguration(XYZVOLUME); }
136 
138 
144  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
145  vtkGetMacro(CollapseDimensionRatio, double);
147 
149 
153  void SetLODFilter(vtkQuadricClustering *lodFilter);
154  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
156 
158 
164  vtkSetClampMacro(MaximumDisplayListSize, int, 1000, VTK_INT_MAX);
165  vtkGetMacro(MaximumDisplayListSize, int);
167 
168 //BTX
170  {
171  FOLLOWER = 0,
172  ACTOR
173  };
174 //ETX
176 
178  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
179  vtkGetMacro(PropType, int);
181  { this->SetPropType(FOLLOWER); }
183  { this->SetPropType(ACTOR); }
185 
187 
189  void SetCamera(vtkCamera*);
190  vtkGetObjectMacro(Camera, vtkCamera);
192 
196  virtual void Render(vtkRenderer *, vtkMapper *);
197 
200  int RenderOpaqueGeometry(vtkViewport *viewport);
201 
206 
208  void ShallowCopy(vtkProp *prop);
209 
210 protected:
213 
214  // Renders the LOD
217 
218  // Keep track of the requested interactive frame rate
220 
221  // Support various strategies
223 
224  // Specify whether the mapper's should be set in to Static mode.
225  int Static;
226 
227  // The dimension of the data
230 
231  // Control whether this is a follower or regular actor
232  int PropType;
234 
235  // Control what size (in terms of number of graphics primitives)
236  // where display lists should be used.
238 
239  // Specify to defer construction of the LOD.
241 
242  // Keep track of building
244 
245  // Helper function determines display list size
246  vtkIdType GetDisplayListSize(vtkPolyData *pd);
247 
248 private:
249  vtkQuadricLODActor(const vtkQuadricLODActor&); // Not implemented.
250  void operator=(const vtkQuadricLODActor&); // Not implemented.
251 };
252 
253 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual void Render(vtkRenderer *, vtkMapper *)
Definition: vtkActor.h:80
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
abstract specification for Viewports
Definition: vtkViewport.h:46
#define VTK_INT_MAX
Definition: vtkType.h:132
record modification and/or execution time
Definition: vtkTimeStamp.h:34
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkQuadricClustering * LODFilter
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
static vtkActor * New()
vtkPolyDataMapper * LODMapper
void PrintSelf(ostream &os, vtkIndent indent)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
void SetDataConfigurationToXYZVolume()
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
#define VTKRENDERINGLOD_EXPORT
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:89
map vtkPolyData to graphics primitives
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
void ReleaseGraphicsResources(vtkWindow *)
a specific level-of-detail strategy using the quadric clustering decimation algorithm ...
void ShallowCopy(vtkProp *prop)
reduce the number of triangles in a mesh