00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00056 #ifndef __vtkProp_h
00057 #define __vtkProp_h
00058
00059 #include "vtkObject.h"
00060 #include "vtkRayCastStructures.h"
00061 #include "vtkAssemblyPaths.h"
00062
00063 class vtkViewport;
00064 class vtkPropCollection;
00065 class vtkWindow;
00066 class vtkMatrix4x4;
00067
00068 class VTK_EXPORT vtkProp : public vtkObject
00069 {
00070 public:
00072 static vtkProp* New();
00073
00074 vtkTypeMacro(vtkProp,vtkObject);
00075 void PrintSelf(ostream& os, vtkIndent indent);
00076
00080 virtual void GetActors(vtkPropCollection *) {}
00081 virtual void GetActors2D(vtkPropCollection *) {}
00082 virtual void GetVolumes(vtkPropCollection *) {}
00083
00085 vtkSetMacro(Visibility, int);
00086 vtkGetMacro(Visibility, int);
00087 vtkBooleanMacro(Visibility, int);
00088
00091 vtkSetMacro(Pickable,int);
00092 vtkGetMacro(Pickable,int);
00093 vtkBooleanMacro(Pickable,int);
00094
00097 void SetPickMethod(void (*f)(void *), void *arg);
00098 void SetPickMethodArgDelete(void (*f)(void *));
00099
00101 virtual void Pick();
00102
00109 vtkSetMacro(Dragable,int);
00110 vtkGetMacro(Dragable,int);
00111 vtkBooleanMacro(Dragable,int);
00112
00117 virtual unsigned long GetRedrawMTime() {return this->GetMTime();}
00118
00121 virtual float *GetBounds() {return NULL;}
00122
00124 virtual void ShallowCopy(vtkProp *prop);
00125
00137 virtual void InitPathTraversal();
00138 virtual vtkAssemblyPath *GetNextPath();
00139 virtual int GetNumberOfPaths() {return 1;}
00140
00144 virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
00145 virtual vtkMatrix4x4 *GetMatrix() {return NULL;}
00146
00147
00154 virtual int RequiresRayCasting() { return 0; }
00155
00162 virtual int RequiresRenderingIntoImage() { return 0; }
00163
00186 virtual int RenderOpaqueGeometry( vtkViewport *) { return 0; }
00187 virtual int RenderTranslucentGeometry( vtkViewport *) { return 0; }
00188 virtual int InitializeRayCasting( vtkViewport *) { return 0; }
00189 virtual int CastViewRay( VTKRayCastRayInfo *) { return 0; }
00190 virtual int RenderIntoImage( vtkViewport *) { return 0; }
00191 virtual float *GetRGBAImage() { return NULL; }
00192 virtual float *GetZImage() { return NULL; }
00193 virtual int RenderOverlay( vtkViewport *) { return 0; }
00194
00199 virtual void ReleaseGraphicsResources(vtkWindow *) {}
00200
00211 virtual float GetEstimatedRenderTime( vtkViewport * )
00212 { return this->EstimatedRenderTime; }
00213 virtual float GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
00214
00219 virtual void SetEstimatedRenderTime(float t)
00220 {this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;}
00221
00227 virtual void RestoreEstimatedRenderTime()
00228 { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
00229
00230
00241 virtual void AddEstimatedRenderTime(float t, vtkViewport *vtkNotUsed(vp))
00242 {this->EstimatedRenderTime+=t;}
00243
00251 virtual void SetAllocatedRenderTime(float t, vtkViewport *vtkNotUsed(v))
00252 {
00253 this->AllocatedRenderTime = t;
00254 this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
00255 this->EstimatedRenderTime = 0.0;
00256 }
00257
00260 vtkGetMacro(AllocatedRenderTime, float);
00261
00266 void SetRenderTimeMultiplier( float t ) { this->RenderTimeMultiplier = t; }
00267 vtkGetMacro(RenderTimeMultiplier, float);
00268
00272 virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00273
00274
00275
00276 #ifndef VTK_REMOVE_LEGACY_CODE
00277 virtual vtkMatrix4x4 *GetMatrixPointer()
00278 {VTK_LEGACY_METHOD(GetMatrixPointer,"3.2"); return NULL;}
00279 #endif
00280
00281 protected:
00282 vtkProp();
00283 ~vtkProp();
00284 vtkProp(const vtkProp&) {};
00285 void operator=(const vtkProp&) {};
00286
00287 int Visibility;
00288 int Pickable;
00289 unsigned long PickTag;
00290 int Dragable;
00291
00292 float AllocatedRenderTime;
00293 float EstimatedRenderTime;
00294 float SavedEstimatedRenderTime;
00295 float RenderTimeMultiplier;
00296
00297
00298
00299 vtkAssemblyPaths *Paths;
00300
00301 };
00302
00303 #endif
00304
00305