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 =========================================================================*/
36 #ifndef vtkLODProp3D_h
37 #define vtkLODProp3D_h
38 
39 #include "vtkRenderingCoreModule.h" // For export macro
40 #include "vtkProp3D.h"
41 
42 class vtkRenderer;
43 class vtkMapper;
46 class vtkImageMapper3D;
47 class vtkProperty;
48 class vtkVolumeProperty;
49 class vtkImageProperty;
50 class vtkTexture;
51 class vtkLODProp3DCallback;
52 
53 typedef struct
54 {
57  int ID;
58  double EstimatedTime;
59  int State;
60  double Level;
62 
63 class VTKRENDERINGCORE_EXPORT vtkLODProp3D : public vtkProp3D
64 {
65 public:
69  static vtkLODProp3D *New();
70 
71  vtkTypeMacro(vtkLODProp3D, vtkProp3D);
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
77  double *GetBounds();
78  void GetBounds(double bounds[6])
79  { this->vtkProp3D::GetBounds( bounds ); }
80 
82 
92  vtkTexture *t, double time );
93  int AddLOD( vtkMapper *m, vtkProperty *p, vtkTexture *t, double time );
94  int AddLOD( vtkMapper *m, vtkProperty *p, vtkProperty *back, double time );
95  int AddLOD( vtkMapper *m, vtkProperty *p, double time );
96  int AddLOD( vtkMapper *m, vtkTexture *t, double time );
97  int AddLOD( vtkMapper *m, double time );
99  int AddLOD( vtkAbstractVolumeMapper *m, double time );
101  int AddLOD( vtkImageMapper3D *m, double time );
103 
105 
108  vtkGetMacro(NumberOfLODs, int);
110 
112 
117  vtkGetMacro(CurrentIndex, int);
119 
124  void RemoveLOD(int id);
125 
127 
133  void SetLODProperty(int id, vtkProperty *p);
134  void GetLODProperty(int id, vtkProperty **p);
138  void GetLODProperty(int id, vtkImageProperty **p);
140 
142 
148  void SetLODMapper(int id, vtkMapper *m);
149  void GetLODMapper(int id, vtkMapper **m);
152  void SetLODMapper(int id, vtkImageMapper3D *m);
153  void GetLODMapper(int id, vtkImageMapper3D **m);
155 
162 
164 
171 
173 
177  void SetLODTexture(int id, vtkTexture *t);
178  void GetLODTexture(int id, vtkTexture **t);
180 
182 
187  void EnableLOD(int id);
188  void DisableLOD(int id);
189  int IsLODEnabled(int id);
191 
193 
201  void SetLODLevel(int id, double level);
202  double GetLODLevel(int id );
203  double GetLODIndexLevel(int index);
205 
207 
215 
217 
222  vtkSetClampMacro(AutomaticLODSelection, int, 0, 1);
223  vtkGetMacro(AutomaticLODSelection, int);
224  vtkBooleanMacro(AutomaticLODSelection, int);
226 
228 
232  vtkSetMacro(SelectedLODID, int);
233  vtkGetMacro(SelectedLODID, int);
235 
240 
244  int GetPickLODID(void);
245 
247 
252  virtual void GetActors(vtkPropCollection *);
253  virtual void GetVolumes(vtkPropCollection *);
255 
257 
261  void SetSelectedPickLODID(int id);
262  vtkGetMacro(SelectedPickLODID, int);
264 
266 
271  vtkSetClampMacro(AutomaticPickLODSelection, int, 0, 1);
272  vtkGetMacro(AutomaticPickLODSelection, int);
273  vtkBooleanMacro(AutomaticPickLODSelection, int);
275 
279  void ShallowCopy(vtkProp *prop);
280 
282 
289 
294 
301 
307  void SetAllocatedRenderTime( double t, vtkViewport *vp );
308 
316 
321  virtual void AddEstimatedRenderTime( double t, vtkViewport *vp );
322 
323 protected:
326 
328 
333 
335  int ConvertIDToIndex( int id );
337 
342  vtkLODProp3DCallback *PickCallback;
343 
344 private:
345  vtkLODProp3D(const vtkLODProp3D&) VTK_DELETE_FUNCTION;
346  void operator=(const vtkLODProp3D&) VTK_DELETE_FUNCTION;
347 };
348 
349 #endif
vtkLODProp3D::SetAllocatedRenderTime
void SetAllocatedRenderTime(double t, vtkViewport *vp)
Used by the culler / renderer to set the allocated render time for this prop.
vtkLODProp3D::GetBounds
double * GetBounds()
Standard vtkProp method to get 3D bounds of a 3D prop.
vtkLODProp3DEntry
Definition: vtkLODProp3D.h:54
vtkLODProp3D::SetLODMapper
void SetLODMapper(int id, vtkMapper *m)
Methods to set / get the mapper of an LOD.
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)
Support the standard render methods.
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, vtkProperty *back, vtkTexture *t, double time)
Add a level of detail with a given mapper, property, backface property, texture, and guess of renderi...
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:56
vtkLODProp3D::NumberOfLODs
int NumberOfLODs
Definition: vtkLODProp3D.h:331
vtkLODProp3D::GetLODMapper
vtkAbstractMapper3D * GetLODMapper(int id)
Get the LODMapper as an vtkAbstractMapper3D.
vtkLODProp3D::GetPickLODID
int GetPickLODID(void)
Get the ID of the appropriate pick LOD index.
vtkLODProp3D::SetLODLevel
void SetLODLevel(int id, double level)
Set the level of a particular LOD.
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
vtkLODProp3D::SetSelectedPickLODID
void SetSelectedPickLODID(int id)
Set the id of the LOD that is to be used for picking when automatic LOD pick selection is turned off.
vtkLODProp3D::GetLODEstimatedRenderTime
double GetLODEstimatedRenderTime(int id)
Access method that can be used to find out the estimated render time (the thing used to select an LOD...
vtkLODProp3DEntry::Prop3D
vtkProp3D * Prop3D
Definition: vtkLODProp3D.h:55
vtkLODProp3D::RenderVolumetricGeometry
virtual int RenderVolumetricGeometry(vtkViewport *ren)
vtkLODProp3D::CurrentIndex
int CurrentIndex
Definition: vtkLODProp3D.h:332
vtkLODProp3D::AddLOD
int AddLOD(vtkAbstractVolumeMapper *m, double time)
vtkLODProp3D::PickCallback
vtkLODProp3DCallback * PickCallback
Definition: vtkLODProp3D.h:342
vtkLODProp3D::AddLOD
int AddLOD(vtkAbstractVolumeMapper *m, vtkVolumeProperty *p, double time)
vtkLODProp3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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)
Methods to set / get the backface property of an LOD.
vtkLODProp3D::LODs
vtkLODProp3DEntry * LODs
Definition: vtkLODProp3D.h:329
vtkLODProp3D::ConvertIDToIndex
int ConvertIDToIndex(int id)
vtkLODProp3D::~vtkLODProp3D
~vtkLODProp3D()
vtkLODProp3DEntry::EstimatedTime
double EstimatedTime
Definition: vtkLODProp3D.h:58
vtkLODProp3D::RestoreEstimatedRenderTime
void RestoreEstimatedRenderTime()
Used when the render process is aborted to restore the previous estimated render time.
vtkLODProp3D::New
static vtkLODProp3D * New()
Create an instance of this class.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkLODProp3DEntry::Level
double Level
Definition: vtkLODProp3D.h:60
vtkLODProp3D::GetLastRenderedLODID
int GetLastRenderedLODID()
Get the ID of the previously (during the last render) selected LOD index.
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkLODProp3D::RemoveLOD
void RemoveLOD(int id)
Delete a level of detail given an ID.
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:71
vtkLODProp3D::GetVolumes
virtual void GetVolumes(vtkPropCollection *)
vtkLODProp3D::NumberOfEntries
int NumberOfEntries
Definition: vtkLODProp3D.h:330
vtkLODProp3D::AddLOD
int AddLOD(vtkImageMapper3D *m, vtkImageProperty *p, double time)
vtkLODProp3DEntry::State
int State
Definition: vtkLODProp3D.h:59
vtkImageProperty
image display properties
Definition: vtkImageProperty.h:43
vtkLODProp3D::SetLODProperty
void SetLODProperty(int id, vtkImageProperty *p)
vtkLODProp3D::AddLOD
int AddLOD(vtkMapper *m, vtkProperty *p, double time)
vtkLODProp3D::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
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:40
vtkLODProp3D::AutomaticPickLODSelection
int AutomaticPickLODSelection
Definition: vtkLODProp3D.h:341
vtkLODProp3D::vtkLODProp3D
vtkLODProp3D()
vtkLODProp3D::EnableLOD
void EnableLOD(int id)
Enable / disable a particular LOD.
vtkLODProp3D::GetBounds
void GetBounds(double bounds[6])
Definition: vtkLODProp3D.h:78
vtkLODProp3D::GetLODProperty
void GetLODProperty(int id, vtkImageProperty **p)
vtkLODProp3D::GetLODMapper
void GetLODMapper(int id, vtkAbstractVolumeMapper **m)
vtkLODProp3D::SelectedLODIndex
int SelectedLODIndex
Definition: vtkLODProp3D.h:336
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkLODProp3D::ShallowCopy
void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkLODProp3D.
vtkLODProp3D::SetLODTexture
void SetLODTexture(int id, vtkTexture *t)
Methods to set / get the texture of an LOD.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkLODProp3D::AddEstimatedRenderTime
virtual void AddEstimatedRenderTime(double t, vtkViewport *vp)
Override method from vtkProp in order to push this call down to the selected LOD as well.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkImageMapper3D
abstract class for mapping images to the screen
Definition: vtkImageMapper3D.h:51
vtkAbstractMapper3D
abstract class specifies interface to map 3D data
Definition: vtkAbstractMapper3D.h:46
vtkLODProp3D::GetLODProperty
void GetLODProperty(int id, vtkProperty **p)
vtkLODProp3D::GetLODBackfaceProperty
void GetLODBackfaceProperty(int id, vtkProperty **t)
vtkLODProp3DEntry::ID
int ID
Definition: vtkLODProp3D.h:57
vtkLODProp3D::SetLODProperty
void SetLODProperty(int id, vtkProperty *p)
Methods to set / get the property of an LOD.
vtkAbstractVolumeMapper
Abstract class for a volume mapper.
Definition: vtkAbstractVolumeMapper.h:39
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 *)
For some exporters and other other operations we must be able to collect all the actors or volumes.
vtkLODProp3D::AddLOD
int AddLOD(vtkImageMapper3D *m, double time)
vtkLODProp3D::SelectedLODID
int SelectedLODID
Definition: vtkLODProp3D.h:339
vtkLODProp3D
level of detail 3D prop
Definition: vtkLODProp3D.h:64
vtkLODProp3D::GetAutomaticPickPropIndex
int GetAutomaticPickPropIndex(void)
vtkLODProp3D::AutomaticLODSelection
int AutomaticLODSelection
Definition: vtkLODProp3D.h:338
vtkLODProp3D::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:65
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:39
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkLODProp3D::GetNextEntryIndex
int GetNextEntryIndex()
vtkLODProp3D::SelectedPickLODID
int SelectedPickLODID
Definition: vtkLODProp3D.h:340
vtkVolumeProperty
represents the common properties for rendering a volume.
Definition: vtkVolumeProperty.h:61
vtkLODProp3D::DisableLOD
void DisableLOD(int id)
vtkProp3D.h
vtkLODProp3D::IsLODEnabled
int IsLODEnabled(int id)
vtkProp3D::GetBounds
virtual double * GetBounds()=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).