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);
79 
81 
86  vtkSetMacro(DeferLODConstruction, int);
87  vtkGetMacro(DeferLODConstruction, int);
88  vtkBooleanMacro(DeferLODConstruction, int);
90 
92 
99  vtkSetMacro(Static, int);
100  vtkGetMacro(Static, int);
101  vtkBooleanMacro(Static, int);
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 
177  vtkSetClampMacro(MaximumDisplayListSize, int, 1000, VTK_INT_MAX);
178  vtkGetMacro(MaximumDisplayListSize, int);
180 
182  {
183  FOLLOWER = 0,
184  ACTOR
185  };
186 
188 
192  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
193  vtkGetMacro(PropType, int);
195  { this->SetPropType(FOLLOWER); }
197  { this->SetPropType(ACTOR); }
199 
201 
205  void SetCamera(vtkCamera*);
206  vtkGetObjectMacro(Camera, vtkCamera);
208 
214  virtual void Render(vtkRenderer *, vtkMapper *);
215 
220  int RenderOpaqueGeometry(vtkViewport *viewport);
221 
228 
232  void ShallowCopy(vtkProp *prop);
233 
234 protected:
237 
238  // Renders the LOD
241 
242  // Keep track of the requested interactive frame rate
244 
245  // Support various strategies
247 
248  // Specify whether the mapper's should be set in to Static mode.
249  int Static;
250 
251  // The dimension of the data
254 
255  // Control whether this is a follower or regular actor
256  int PropType;
258 
259  // Control what size (in terms of number of graphics primitives)
260  // where display lists should be used.
262 
263  // Specify to defer construction of the LOD.
265 
266  // Keep track of building
268 
269  // Helper function determines display list size
270  vtkIdType GetDisplayListSize(vtkPolyData *pd);
271 
272 private:
273  vtkQuadricLODActor(const vtkQuadricLODActor&) VTK_DELETE_FUNCTION;
274  void operator=(const vtkQuadricLODActor&) VTK_DELETE_FUNCTION;
275 };
276 
277 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
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
#define VTK_INT_MAX
Definition: vtkType.h:153
record modification and/or execution time
Definition: vtkTimeStamp.h:35
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkQuadricClustering * LODFilter
int vtkIdType
Definition: vtkType.h:287
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 PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:91
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
map vtkPolyData to graphics primitives
void SetDataConfigurationToXLine()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
Support the standard render methods.
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 ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetDataConfigurationToUnknown()
Force the binning of the quadric clustering according to application knowledge relative to the dimens...
a specific level-of-detail strategy using the quadric clustering decimation algorithm ...
void ShallowCopy(vtkProp *prop)
Shallow copy of an actor.
reduce the number of triangles in a mesh