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
42class vtkRenderer;
43class vtkMapper;
47class vtkProperty;
50class vtkTexture;
51class vtkLODProp3DCallback;
52
53typedef struct
54{
57 int ID;
59 int State;
60 double Level;
62
63class VTKRENDERINGCORE_EXPORT vtkLODProp3D : public vtkProp3D
64{
65public:
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 );
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);
140
142
148 void SetLODMapper(int id, vtkMapper *m);
149 void GetLODMapper(int id, vtkMapper **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 );
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
255
257
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
323protected:
326
328
333
335 int ConvertIDToIndex( int id );
337
342 vtkLODProp3DCallback *PickCallback;
343
344private:
345 vtkLODProp3D(const vtkLODProp3D&) VTK_DELETE_FUNCTION;
346 void operator=(const vtkLODProp3D&) VTK_DELETE_FUNCTION;
347};
348
349#endif
abstract class specifies interface to map 3D data
Abstract class for a volume mapper.
abstract class for mapping images to the screen
image display properties
a simple class to control print indentation
Definition: vtkIndent.h:40
level of detail 3D prop
Definition: vtkLODProp3D.h:64
void GetLODMapper(int id, vtkImageMapper3D **m)
virtual int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
void SetLODMapper(int id, vtkMapper *m)
Methods to set / get the mapper of an LOD.
int GetAutomaticPickPropIndex(void)
void SetLODProperty(int id, vtkImageProperty *p)
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.
double * GetBounds()
Standard vtkProp method to get 3D bounds of a 3D prop.
vtkLODProp3DEntry * LODs
Definition: vtkLODProp3D.h:329
int IsLODEnabled(int id)
double GetLODLevel(int id)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *ren)
vtkAbstractMapper3D * GetLODMapper(int id)
Get the LODMapper as an vtkAbstractMapper3D.
void SetAllocatedRenderTime(double t, vtkViewport *vp)
Used by the culler / renderer to set the allocated render time for this prop.
virtual int RenderVolumetricGeometry(vtkViewport *ren)
int GetLastRenderedLODID()
Get the ID of the previously (during the last render) selected LOD index.
virtual void AddEstimatedRenderTime(double t, vtkViewport *vp)
Override method from vtkProp in order to push this call down to the selected LOD as well.
int SelectedPickLODID
Definition: vtkLODProp3D.h:340
int GetNextEntryIndex()
vtkLODProp3DCallback * PickCallback
Definition: vtkLODProp3D.h:342
static vtkLODProp3D * New()
Create an instance of this class.
int AddLOD(vtkAbstractVolumeMapper *m, vtkVolumeProperty *p, double time)
void SetLODProperty(int id, vtkProperty *p)
Methods to set / get the property of an LOD.
int SelectedLODIndex
Definition: vtkLODProp3D.h:336
virtual void GetVolumes(vtkPropCollection *)
void RestoreEstimatedRenderTime()
Used when the render process is aborted to restore the previous estimated render time.
void RemoveLOD(int id)
Delete a level of detail given an ID.
double GetLODIndexEstimatedRenderTime(int index)
void GetLODMapper(int id, vtkMapper **m)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
double GetLODIndexLevel(int index)
void GetLODProperty(int id, vtkProperty **p)
void GetLODTexture(int id, vtkTexture **t)
int AutomaticPickLODSelection
Definition: vtkLODProp3D.h:341
void SetLODLevel(int id, double level)
Set the level of a particular LOD.
double GetLODEstimatedRenderTime(int id)
Access method that can be used to find out the estimated render time (the thing used to select an LOD...
void GetBounds(double bounds[6])
Definition: vtkLODProp3D.h:78
void EnableLOD(int id)
Enable / disable a particular LOD.
void GetLODBackfaceProperty(int id, vtkProperty **t)
int ConvertIDToIndex(int id)
virtual void GetActors(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors or volumes.
void SetLODMapper(int id, vtkImageMapper3D *m)
int AddLOD(vtkMapper *m, vtkProperty *p, double time)
void SetLODBackfaceProperty(int id, vtkProperty *t)
Methods to set / get the backface property of an LOD.
int AddLOD(vtkImageMapper3D *m, vtkImageProperty *p, double time)
int AddLOD(vtkAbstractVolumeMapper *m, double time)
int AddLOD(vtkMapper *m, double time)
void GetLODProperty(int id, vtkImageProperty **p)
void DisableLOD(int id)
int RenderOpaqueGeometry(vtkViewport *viewport)
Support the standard render methods.
int AddLOD(vtkImageMapper3D *m, double time)
void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkLODProp3D.
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...
int AutomaticLODSelection
Definition: vtkLODProp3D.h:338
void SetLODMapper(int id, vtkAbstractVolumeMapper *m)
int AddLOD(vtkMapper *m, vtkProperty *p, vtkProperty *back, double time)
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
int GetPickLODID(void)
Get the ID of the appropriate pick LOD index.
int AddLOD(vtkMapper *m, vtkProperty *p, vtkTexture *t, double time)
void GetLODProperty(int id, vtkVolumeProperty **p)
void SetLODProperty(int id, vtkVolumeProperty *p)
void SetLODTexture(int id, vtkTexture *t)
Methods to set / get the texture of an LOD.
void GetLODMapper(int id, vtkAbstractVolumeMapper **m)
int AddLOD(vtkMapper *m, vtkTexture *t, double time)
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
virtual double * GetBounds()=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
a list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
represent surface properties of a geometric object
Definition: vtkProperty.h:65
abstract specification for renderers
Definition: vtkRenderer.h:64
handles properties associated with a texture map
Definition: vtkTexture.h:71
abstract specification for Viewports
Definition: vtkViewport.h:48
represents the common properties for rendering a volume.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ level
Definition: vtkX3D.h:395
@ time
Definition: vtkX3D.h:497
@ index
Definition: vtkX3D.h:246
vtkProp3D * Prop3D
Definition: vtkLODProp3D.h:55
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.