VTK
vtkLODProp3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLODProp3D.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 =========================================================================*/
38 #ifndef vtkLODProp3D_h
39 #define vtkLODProp3D_h
40 
41 #include "vtkRenderingCoreModule.h" // For export macro
42 #include "vtkProp3D.h"
43 
44 class vtkRenderer;
45 class vtkMapper;
48 class vtkImageMapper3D;
49 class vtkProperty;
50 class vtkVolumeProperty;
51 class vtkImageProperty;
52 class vtkTexture;
53 class vtkLODProp3DCallback;
54 
55 typedef struct
56 {
59  int ID;
60  double EstimatedTime;
61  int State;
62  double Level;
64 
66 {
67 public:
69  static vtkLODProp3D *New();
70 
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
76  double *GetBounds();
77  void GetBounds(double bounds[6])
78  { this->vtkProp3D::GetBounds( bounds ); }
80 
82 
90  vtkTexture *t, double time );
91  int AddLOD( vtkMapper *m, vtkProperty *p, vtkTexture *t, double time );
92  int AddLOD( vtkMapper *m, vtkProperty *p, vtkProperty *back, double time );
93  int AddLOD( vtkMapper *m, vtkProperty *p, double time );
94  int AddLOD( vtkMapper *m, vtkTexture *t, double time );
95  int AddLOD( vtkMapper *m, double time );
99  int AddLOD( vtkImageMapper3D *m, double time );
101 
103 
104  vtkGetMacro(NumberOfLODs, int);
106 
108 
112  vtkGetMacro(CurrentIndex, int);
114 
117  void RemoveLOD(int id);
118 
120 
124  void SetLODProperty(int id, vtkProperty *p);
125  void GetLODProperty(int id, vtkProperty **p);
131 
133 
137  void SetLODMapper(int id, vtkMapper *m);
138  void GetLODMapper(int id, vtkMapper **m);
142  void GetLODMapper(int id, vtkImageMapper3D **m);
144 
149 
151 
156 
158 
160  void SetLODTexture(int id, vtkTexture *t);
161  void GetLODTexture(int id, vtkTexture **t);
163 
165 
168  void EnableLOD(int id);
169  void DisableLOD(int id);
170  int IsLODEnabled(int id);
172 
174 
179  void SetLODLevel(int id, double level);
180  double GetLODLevel(int id );
181  double GetLODIndexLevel(int index);
183 
185 
191 
193 
196  vtkSetClampMacro(AutomaticLODSelection, int, 0, 1);
197  vtkGetMacro(AutomaticLODSelection, int);
198  vtkBooleanMacro(AutomaticLODSelection, int);
200 
202 
204  vtkSetMacro(SelectedLODID, int);
205  vtkGetMacro(SelectedLODID, int);
207 
211 
213  int GetPickLODID(void);
214 
216 
219  virtual void GetActors(vtkPropCollection *);
220  virtual void GetVolumes(vtkPropCollection *);
222 
224 
226  void SetSelectedPickLODID(int id);
227  vtkGetMacro(SelectedPickLODID, int);
229 
231 
234  vtkSetClampMacro(AutomaticPickLODSelection, int, 0, 1);
235  vtkGetMacro(AutomaticPickLODSelection, int);
236  vtkBooleanMacro(AutomaticPickLODSelection, int);
238 
240  void ShallowCopy(vtkProp *prop);
241 
242 //BTX
243 
245 
250 
253 
258 
262  void SetAllocatedRenderTime( double t, vtkViewport *vp );
263 
269 
272  virtual void AddEstimatedRenderTime( double t, vtkViewport *vp );
273 
274 //ETX
275 
276 protected:
279 
281 
286 
288  int ConvertIDToIndex( int id );
290 
295  vtkLODProp3DCallback *PickCallback;
296 
297 private:
298  vtkLODProp3D(const vtkLODProp3D&); // Not implemented.
299  void operator=(const vtkLODProp3D&); // Not implemented.
300 };
301 
302 #endif
vtkLODProp3D::SetAllocatedRenderTime
void SetAllocatedRenderTime(double t, vtkViewport *vp)
vtkLODProp3D::GetBounds
double * GetBounds()
vtkLODProp3DEntry
Definition: vtkLODProp3D.h:56
vtkLODProp3D::SetLODMapper
void SetLODMapper(int id, vtkMapper *m)
vtkLODProp3D::SetLODProperty
void SetLODProperty(int id, vtkVolumeProperty *p)
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, double time)
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkTexture *t, double time)
vtkLODProp3D::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport)
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, vtkProperty *back, vtkTexture *t, double time)
vtkLODProp3D::GetLODIndexEstimatedRenderTime
double GetLODIndexEstimatedRenderTime(int index)
vtkLODProp3D::GetLODProperty
void GetLODProperty(int id, vtkVolumeProperty **p)
vtkLODProp3D::GetLODTexture
void GetLODTexture(int id, vtkTexture **t)
vtkLODProp3DEntry::Prop3DType
int Prop3DType
Definition: vtkLODProp3D.h:58
vtkgl::m
const GLfloat * m
Definition: vtkgl.h:18169
vtkLODProp3D::NumberOfLODs
int NumberOfLODs
Definition: vtkLODProp3D.h:284
vtkLODProp3D::GetLODMapper
vtkAbstractMapper3D * GetLODMapper(int id)
vtkLODProp3D::GetPickLODID
int GetPickLODID(void)
vtkLODProp3D::SetLODLevel
void SetLODLevel(int id, double level)
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkLODProp3D::SetSelectedPickLODID
void SetSelectedPickLODID(int id)
vtkLODProp3D::GetLODEstimatedRenderTime
double GetLODEstimatedRenderTime(int id)
vtkLODProp3DEntry::Prop3D
vtkProp3D * Prop3D
Definition: vtkLODProp3D.h:57
vtkLODProp3D::RenderVolumetricGeometry
virtual int RenderVolumetricGeometry(vtkViewport *ren)
vtkLODProp3D::CurrentIndex
int CurrentIndex
Definition: vtkLODProp3D.h:285
vtkLODProp3D::AddLOD
int AddLOD(vtkAbstractVolumeMapper *m, double time)
vtkLODProp3D::PickCallback
vtkLODProp3DCallback * PickCallback
Definition: vtkLODProp3D.h:295
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkLODProp3D::AddLOD
int AddLOD(vtkAbstractVolumeMapper *m, vtkVolumeProperty *p, double time)
vtkLODProp3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkLODProp3D::GetLODMapper
void GetLODMapper(int id, vtkImageMapper3D **m)
vtkX3D::time
@ time
Definition: vtkX3D.h:497
vtkLODProp3D::GetLODIndexLevel
double GetLODIndexLevel(int index)
vtkLODProp3D::GetLODLevel
double GetLODLevel(int id)
vtkLODProp3D::SetLODBackfaceProperty
void SetLODBackfaceProperty(int id, vtkProperty *t)
vtkLODProp3D::LODs
vtkLODProp3DEntry * LODs
Definition: vtkLODProp3D.h:282
vtkLODProp3D::ConvertIDToIndex
int ConvertIDToIndex(int id)
vtkLODProp3D::~vtkLODProp3D
~vtkLODProp3D()
vtkLODProp3DEntry::EstimatedTime
double EstimatedTime
Definition: vtkLODProp3D.h:60
vtkLODProp3D::RestoreEstimatedRenderTime
void RestoreEstimatedRenderTime()
vtkLODProp3D::New
static vtkLODProp3D * New()
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkLODProp3DEntry::Level
double Level
Definition: vtkLODProp3D.h:62
vtkLODProp3D::GetLastRenderedLODID
int GetLastRenderedLODID()
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkLODProp3D::RemoveLOD
void RemoveLOD(int id)
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:70
vtkLODProp3D::GetVolumes
virtual void GetVolumes(vtkPropCollection *)
vtkLODProp3D::NumberOfEntries
int NumberOfEntries
Definition: vtkLODProp3D.h:283
vtkLODProp3D::AddLOD
int AddLOD(vtkImageMapper3D *m, vtkImageProperty *p, double time)
vtkLODProp3DEntry::State
int State
Definition: vtkLODProp3D.h:61
vtkImageProperty
image display properties
Definition: vtkImageProperty.h:42
vtkLODProp3D::SetLODProperty
void SetLODProperty(int id, vtkImageProperty *p)
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, double time)
vtkLODProp3D::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:90
vtkLODProp3D::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *ren)
vtkLODProp3D::SetLODMapper
void SetLODMapper(int id, vtkAbstractVolumeMapper *m)
vtkLODProp3D::GetLODMapper
void GetLODMapper(int id, vtkMapper **m)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
vtkLODProp3D::AutomaticPickLODSelection
int AutomaticPickLODSelection
Definition: vtkLODProp3D.h:294
vtkLODProp3D::vtkLODProp3D
vtkLODProp3D()
vtkLODProp3D::EnableLOD
void EnableLOD(int id)
vtkLODProp3D::GetBounds
void GetBounds(double bounds[6])
Definition: vtkLODProp3D.h:77
vtkLODProp3D::GetLODProperty
void GetLODProperty(int id, vtkImageProperty **p)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkLODProp3D::GetLODMapper
void GetLODMapper(int id, vtkAbstractVolumeMapper **m)
vtkLODProp3D::SelectedLODIndex
int SelectedLODIndex
Definition: vtkLODProp3D.h:289
vtkgl::level
GLint level
Definition: vtkgl.h:11316
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkLODProp3D::ShallowCopy
void ShallowCopy(vtkProp *prop)
vtkLODProp3D::SetLODTexture
void SetLODTexture(int id, vtkTexture *t)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkLODProp3D::AddEstimatedRenderTime
virtual void AddEstimatedRenderTime(double t, vtkViewport *vp)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
vtkImageMapper3D
abstract class for mapping images to the screen
Definition: vtkImageMapper3D.h:50
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkAbstractMapper3D
abstract class specifies interface to map 3D data
Definition: vtkAbstractMapper3D.h:42
vtkLODProp3D::GetLODProperty
void GetLODProperty(int id, vtkProperty **p)
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkLODProp3D::GetLODBackfaceProperty
void GetLODBackfaceProperty(int id, vtkProperty **t)
vtkLODProp3DEntry::ID
int ID
Definition: vtkLODProp3D.h:59
vtkLODProp3D::SetLODProperty
void SetLODProperty(int id, vtkProperty *p)
vtkAbstractVolumeMapper
Abstract class for a volume mapper.
Definition: vtkAbstractVolumeMapper.h:38
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, vtkProperty *back, double time)
vtkLODProp3D::GetActors
virtual void GetActors(vtkPropCollection *)
vtkLODProp3D::AddLOD
int AddLOD(vtkImageMapper3D *m, double time)
vtkLODProp3D::SelectedLODID
int SelectedLODID
Definition: vtkLODProp3D.h:292
vtkLODProp3D
level of detail 3D prop
Definition: vtkLODProp3D.h:66
vtkLODProp3D::GetAutomaticPickPropIndex
int GetAutomaticPickPropIndex(void)
vtkLODProp3D::AutomaticLODSelection
int AutomaticLODSelection
Definition: vtkLODProp3D.h:291
vtkLODProp3D::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *)
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:64
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, vtkTexture *t, double time)
vtkLODProp3D::SetLODMapper
void SetLODMapper(int id, vtkImageMapper3D *m)
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkLODProp3D::GetNextEntryIndex
int GetNextEntryIndex()
vtkLODProp3D::SelectedPickLODID
int SelectedPickLODID
Definition: vtkLODProp3D.h:293
vtkVolumeProperty
represents the common properties for rendering a volume.
Definition: vtkVolumeProperty.h:60
vtkLODProp3D::DisableLOD
void DisableLOD(int id)
vtkProp3D.h
vtkLODProp3D::IsLODEnabled
int IsLODEnabled(int id)
vtkProp3D::GetBounds
virtual double * GetBounds()=0