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 "vtkRenderingLODModule.h" // For export macro
54 #include "vtkActor.h"
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,
104  XLINE, YLINE, ZLINE,
105  XYPLANE, XZPLANE, YZPLANE,
106  XYZVOLUME
107  };
108 
110 
123  vtkSetClampMacro(DataConfiguration, int, UNKNOWN,XYZVOLUME);
124  vtkGetMacro(DataConfiguration, int);
126  { this->SetDataConfiguration(UNKNOWN); }
128  { this->SetDataConfiguration(XLINE); }
130  { this->SetDataConfiguration(YLINE); }
132  { this->SetDataConfiguration(ZLINE); }
134  { this->SetDataConfiguration(XYPLANE); }
136  { this->SetDataConfiguration(YZPLANE); }
138  { this->SetDataConfiguration(XZPLANE); }
140  { this->SetDataConfiguration(XYZVOLUME); }
142 
144 
151  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
152  vtkGetMacro(CollapseDimensionRatio, double);
154 
156 
161  void SetLODFilter(vtkQuadricClustering *lodFilter);
162  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
164 
166  {
167  FOLLOWER = 0,
168  ACTOR
169  };
170 
172 
176  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
177  vtkGetMacro(PropType, int);
179  { this->SetPropType(FOLLOWER); }
181  { this->SetPropType(ACTOR); }
183 
185 
189  void SetCamera(vtkCamera*);
190  vtkGetObjectMacro(Camera, vtkCamera);
192 
198  void Render(vtkRenderer *, vtkMapper *) override;
199 
204  int RenderOpaqueGeometry(vtkViewport *viewport) override;
205 
211  void ReleaseGraphicsResources(vtkWindow *) override;
212 
216  void ShallowCopy(vtkProp *prop) override;
217 
218 protected:
220  ~vtkQuadricLODActor() override;
221 
222  // Renders the LOD
225 
226  // Keep track of the requested interactive frame rate
228 
229  // Support various strategies
231 
232  // Specify whether the mapper's should be set in to Static mode.
234 
235  // The dimension of the data
238 
239  // Control whether this is a follower or regular actor
240  int PropType;
242 
243  // Specify to defer construction of the LOD.
245 
246  // Keep track of building
248 
249 private:
250  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
251  void operator=(const vtkQuadricLODActor&) = delete;
252 };
253 
254 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:46
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:84
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:45
abstract specification for Viewports
Definition: vtkViewport.h:44
record modification and/or execution time
Definition: vtkTimeStamp.h:32
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:57
vtkQuadricClustering * LODFilter
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,...
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:34
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:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
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:80
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