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 "vtkActor.h"
56 
58 class vtkPolyDataMapper;
59 class vtkCamera;
60 class vtkPolyData;
61 
63 {
64 public:
66  static vtkQuadricLODActor *New();
67 
69 
71  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
79  vtkSetMacro(DeferLODConstruction,int);
80  vtkGetMacro(DeferLODConstruction,int);
81  vtkBooleanMacro(DeferLODConstruction,int);
83 
85 
90  vtkSetMacro(Static,int);
91  vtkGetMacro(Static,int);
92  vtkBooleanMacro(Static,int);
94 
95 //BTX
97  {
98  UNKNOWN=0,
99  XLINE,YLINE,ZLINE,
100  XYPLANE,XZPLANE,YZPLANE,
101  XYZVOLUME
102  };
103 //ETX
105 
116  vtkSetClampMacro(DataConfiguration,int,UNKNOWN,XYZVOLUME);
117  vtkGetMacro(DataConfiguration,int);
118  void SetDataConfigurationToUnknown()
119  {this->SetDataConfiguration(UNKNOWN);}
120  void SetDataConfigurationToXLine()
121  {this->SetDataConfiguration(XLINE);}
122  void SetDataConfigurationToYLine()
123  {this->SetDataConfiguration(YLINE);}
124  void SetDataConfigurationToZLine()
125  {this->SetDataConfiguration(ZLINE);}
126  void SetDataConfigurationToXYPlane()
127  {this->SetDataConfiguration(XYPLANE);}
128  void SetDataConfigurationToYZPlane()
129  {this->SetDataConfiguration(YZPLANE);}
130  void SetDataConfigurationToXZPlane()
131  {this->SetDataConfiguration(XZPLANE);}
132  void SetDataConfigurationToXYZVolume()
133  {this->SetDataConfiguration(XYZVOLUME);}
135 
137 
143  vtkSetClampMacro(CollapseDimensionRatio,double,0.0,1.0);
144  vtkGetMacro(CollapseDimensionRatio,double);
146 
148 
152  void SetLODFilter(vtkQuadricClustering *lodFilter);
153  vtkGetObjectMacro(LODFilter,vtkQuadricClustering);
155 
157 
163  vtkSetClampMacro(MaximumDisplayListSize,int,1000,VTK_LARGE_INTEGER);
164  vtkGetMacro(MaximumDisplayListSize,int);
166 
167 //BTX
169  {
170  FOLLOWER=0,
171  ACTOR
172  };
173 //ETX
175 
177  vtkSetClampMacro(PropType,int,FOLLOWER,ACTOR);
178  vtkGetMacro(PropType,int);
179  void SetPropTypeToFollower()
180  {this->SetPropType(FOLLOWER);}
181  void SetPropTypeToActor()
182  {this->SetPropType(ACTOR);}
184 
186 
188  void SetCamera(vtkCamera*);
189  vtkGetObjectMacro(Camera,vtkCamera);
191 
195  virtual void Render(vtkRenderer *, vtkMapper *);
196 
199  int RenderOpaqueGeometry(vtkViewport *viewport);
200 
205 
207  void ShallowCopy(vtkProp *prop);
208 
209 protected:
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.
224  int Static;
225 
226  // The dimension of the data
229 
230  // Control whether this is a follower or regular actor
231  int PropType;
233 
234  // Control what size (in terms of number of graphics primitives)
235  // where display lists should be used.
237 
238  // Specify to defer construction of the LOD.
240 
241  // Keep track of building
243 
244  // Helper function determines display list size
245  vtkIdType GetDisplayListSize(vtkPolyData *pd);
246 
247 private:
248  vtkQuadricLODActor(const vtkQuadricLODActor&); // Not implemented.
249  void operator=(const vtkQuadricLODActor&); // Not implemented.
250 };
251 
252 #endif
253 
254