Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkLODProp3D.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkLODProp3D.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00038 #ifndef __vtkLODProp3D_h 00039 #define __vtkLODProp3D_h 00040 00041 #include "vtkProp3D.h" 00042 00043 class vtkRenderer; 00044 class vtkMapper; 00045 class vtkAbstractVolumeMapper; 00046 class vtkAbstractMapper3D; 00047 class vtkProperty; 00048 class vtkVolumeProperty; 00049 class vtkTexture; 00050 class vtkLODProp3DCallback; 00051 00052 typedef struct 00053 { 00054 vtkProp3D *Prop3D; 00055 int Prop3DType; 00056 int ID; 00057 double EstimatedTime; 00058 int State; 00059 double Level; 00060 } vtkLODProp3DEntry; 00061 00062 class VTK_RENDERING_EXPORT vtkLODProp3D : public vtkProp3D 00063 { 00064 public: 00066 static vtkLODProp3D *New(); 00067 00068 vtkTypeRevisionMacro(vtkLODProp3D,vtkProp3D); 00069 void PrintSelf(ostream& os, vtkIndent indent); 00070 00072 00073 double *GetBounds(); 00074 void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds( bounds ); }; 00076 00078 00085 int AddLOD( vtkMapper *m, vtkProperty *p, vtkProperty *back, 00086 vtkTexture *t, double time ); 00087 int AddLOD( vtkMapper *m, vtkProperty *p, vtkTexture *t, double time ); 00088 int AddLOD( vtkMapper *m, vtkProperty *p, vtkProperty *back, double time ); 00089 int AddLOD( vtkMapper *m, vtkProperty *p, double time ); 00090 int AddLOD( vtkMapper *m, vtkTexture *t, double time ); 00091 int AddLOD( vtkMapper *m, double time ); 00092 int AddLOD( vtkAbstractVolumeMapper *m, vtkVolumeProperty *p, double time ); 00093 int AddLOD( vtkAbstractVolumeMapper *m, double time ); 00095 00097 00098 vtkGetMacro(NumberOfLODs, int); 00100 00102 00106 vtkGetMacro(CurrentIndex, int); 00108 00111 void RemoveLOD( int id ); 00112 00114 00118 void SetLODProperty( int id, vtkProperty *p ); 00119 void GetLODProperty( int id, vtkProperty **p ); 00120 void SetLODProperty( int id, vtkVolumeProperty *p ); 00121 void GetLODProperty( int id, vtkVolumeProperty **p ); 00123 00125 00129 void SetLODMapper( int id, vtkMapper *m ); 00130 void GetLODMapper( int id, vtkMapper **m ); 00131 void SetLODMapper( int id, vtkAbstractVolumeMapper *m ); 00132 void GetLODMapper( int id, vtkAbstractVolumeMapper **m ); 00134 00138 vtkAbstractMapper3D *GetLODMapper(int id); 00139 00141 00143 void SetLODBackfaceProperty( int id, vtkProperty *t ); 00144 void GetLODBackfaceProperty( int id, vtkProperty **t ); 00146 00148 00150 void SetLODTexture( int id, vtkTexture *t ); 00151 void GetLODTexture( int id, vtkTexture **t ); 00153 00155 00158 void EnableLOD( int id ); 00159 void DisableLOD( int id ); 00160 int IsLODEnabled( int id ); 00162 00164 00169 void SetLODLevel( int id, double level ); 00170 double GetLODLevel( int id ); 00171 double GetLODIndexLevel( int index ); 00173 00175 00178 double GetLODEstimatedRenderTime( int id ); 00179 double GetLODIndexEstimatedRenderTime( int index ); 00181 00183 00186 vtkSetClampMacro( AutomaticLODSelection, int, 0, 1 ); 00187 vtkGetMacro( AutomaticLODSelection, int ); 00188 vtkBooleanMacro( AutomaticLODSelection, int ); 00190 00192 00194 vtkSetMacro( SelectedLODID, int ); 00195 vtkGetMacro( SelectedLODID, int ); 00197 00200 int GetLastRenderedLODID(); 00201 00203 int GetPickLODID(void); 00204 00208 virtual void GetActors(vtkPropCollection *); 00209 00211 00213 void SetSelectedPickLODID(int id); 00214 vtkGetMacro( SelectedPickLODID, int ); 00216 00218 00221 vtkSetClampMacro( AutomaticPickLODSelection, int, 0, 1 ); 00222 vtkGetMacro( AutomaticPickLODSelection, int ); 00223 vtkBooleanMacro( AutomaticPickLODSelection, int ); 00225 00227 void ShallowCopy(vtkProp *prop); 00228 00229 //BTX 00230 00232 00233 int RenderOpaqueGeometry(vtkViewport *viewport); 00234 int RenderTranslucentGeometry(vtkViewport *viewport); 00236 00240 void ReleaseGraphicsResources(vtkWindow *); 00241 00245 void SetAllocatedRenderTime( double t, vtkViewport *vp ); 00246 00251 void RestoreEstimatedRenderTime( ); 00252 00255 virtual void AddEstimatedRenderTime( double t, vtkViewport *vp ); 00256 00257 //ETX 00258 00259 protected: 00260 vtkLODProp3D(); 00261 ~vtkLODProp3D(); 00262 00263 int GetAutomaticPickPropIndex(void); 00264 00265 vtkLODProp3DEntry *LODs; 00266 int NumberOfEntries; 00267 int NumberOfLODs; 00268 int CurrentIndex; 00269 00270 int GetNextEntryIndex(); 00271 int ConvertIDToIndex( int id ); 00272 int SelectedLODIndex; 00273 00274 int AutomaticLODSelection; 00275 int SelectedLODID; 00276 int SelectedPickLODID; 00277 int AutomaticPickLODSelection; 00278 vtkLODProp3DCallback *PickCallback; 00279 00280 private: 00281 vtkLODProp3D(const vtkLODProp3D&); // Not implemented. 00282 void operator=(const vtkLODProp3D&); // Not implemented. 00283 }; 00284 00285 #endif 00286