VTK  9.2.6
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 "vtkActor.h"
57 #include "vtkRenderingLODModule.h" // For export macro
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,
113  XYZVOLUME
114  };
115 
117 
130  vtkSetClampMacro(DataConfiguration, int, UNKNOWN, XYZVOLUME);
131  vtkGetMacro(DataConfiguration, int);
132  void SetDataConfigurationToUnknown() { this->SetDataConfiguration(UNKNOWN); }
133  void SetDataConfigurationToXLine() { this->SetDataConfiguration(XLINE); }
134  void SetDataConfigurationToYLine() { this->SetDataConfiguration(YLINE); }
135  void SetDataConfigurationToZLine() { this->SetDataConfiguration(ZLINE); }
136  void SetDataConfigurationToXYPlane() { this->SetDataConfiguration(XYPLANE); }
137  void SetDataConfigurationToYZPlane() { this->SetDataConfiguration(YZPLANE); }
138  void SetDataConfigurationToXZPlane() { this->SetDataConfiguration(XZPLANE); }
139  void SetDataConfigurationToXYZVolume() { this->SetDataConfiguration(XYZVOLUME); }
141 
143 
150  vtkSetClampMacro(CollapseDimensionRatio, double, 0.0, 1.0);
151  vtkGetMacro(CollapseDimensionRatio, double);
153 
155 
160  void SetLODFilter(vtkQuadricClustering* lodFilter);
161  vtkGetObjectMacro(LODFilter, vtkQuadricClustering);
163 
165  {
166  FOLLOWER = 0,
167  ACTOR
168  };
169 
171 
175  vtkSetClampMacro(PropType, int, FOLLOWER, ACTOR);
176  vtkGetMacro(PropType, int);
177  void SetPropTypeToFollower() { this->SetPropType(FOLLOWER); }
178  void SetPropTypeToActor() { this->SetPropType(ACTOR); }
180 
182 
186  void SetCamera(vtkCamera*);
187  vtkGetObjectMacro(Camera, vtkCamera);
189 
195  void Render(vtkRenderer*, vtkMapper*) override;
196 
202  void ReleaseGraphicsResources(vtkWindow*) override;
203 
207  void ShallowCopy(vtkProp* prop) override;
208 
209 protected:
211  ~vtkQuadricLODActor() override;
212 
213  // Renders the LOD
216 
217  // Keep track of the requested interactive frame rate
219 
220  // Support various strategies
222 
223  // Specify whether the mapper's should be set in to Static mode.
225 
226  // The dimension of the data
229 
230  // Control whether this is a follower or regular actor
231  int PropType;
233 
234  // Specify to defer construction of the LOD.
236 
237  // Keep track of building
239 
240 private:
241  vtkQuadricLODActor(const vtkQuadricLODActor&) = delete;
242  void operator=(const vtkQuadricLODActor&) = delete;
243 };
244 
245 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:93
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
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:72
vtkQuadricClustering * LODFilter
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
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:38
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:51
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:87
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...
a specific level-of-detail strategy using the quadric clustering decimation algorithm ...
reduce the number of triangles in a mesh