00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkProp_h
00037 #define __vtkProp_h
00038
00039 #include "vtkObject.h"
00040
00041 class vtkAssemblyPath;
00042 class vtkAssemblyPaths;
00043 class vtkMatrix4x4;
00044 class vtkPropCollection;
00045 class vtkViewport;
00046 class vtkWindow;
00047
00048 class VTK_COMMON_EXPORT vtkProp : public vtkObject
00049 {
00050 public:
00051 vtkTypeRevisionMacro(vtkProp,vtkObject);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00058 virtual void GetActors(vtkPropCollection *) {}
00059 virtual void GetActors2D(vtkPropCollection *) {}
00060 virtual void GetVolumes(vtkPropCollection *) {}
00062
00064
00065 vtkSetMacro(Visibility, int);
00066 vtkGetMacro(Visibility, int);
00067 vtkBooleanMacro(Visibility, int);
00069
00071
00073 vtkSetMacro(Pickable,int);
00074 vtkGetMacro(Pickable,int);
00075 vtkBooleanMacro(Pickable,int);
00077
00079 virtual void Pick();
00080
00082
00088 vtkSetMacro(Dragable,int);
00089 vtkGetMacro(Dragable,int);
00090 vtkBooleanMacro(Dragable,int);
00092
00097 virtual unsigned long GetRedrawMTime() {return this->GetMTime();}
00098
00101 virtual double *GetBounds() {return NULL;}
00102
00104 virtual void ShallowCopy(vtkProp *prop);
00105
00107
00118 virtual void InitPathTraversal();
00119 virtual vtkAssemblyPath *GetNextPath();
00120 virtual int GetNumberOfPaths() {return 1;}
00122
00124
00127 virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
00128 virtual vtkMatrix4x4 *GetMatrix() {return NULL;}
00130
00131
00133
00146 virtual int RenderOpaqueGeometry( vtkViewport *) { return 0; }
00147 virtual int RenderTranslucentPolygonalGeometry( vtkViewport *) { return 0; }
00148 virtual int RenderVolumetricGeometry( vtkViewport *) { return 0; }
00149 virtual int RenderOverlay( vtkViewport *) { return 0; }
00151
00160 virtual int HasTranslucentPolygonalGeometry() { return 0; }
00161
00166 virtual void ReleaseGraphicsResources(vtkWindow *) {}
00167
00169
00179 virtual double GetEstimatedRenderTime( vtkViewport * )
00180 { return this->EstimatedRenderTime; }
00181 virtual double GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
00183
00185
00189 virtual void SetEstimatedRenderTime(double t)
00190 {this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;}
00192
00194
00199 virtual void RestoreEstimatedRenderTime()
00200 { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
00202
00203
00205
00215 virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
00216 {this->EstimatedRenderTime+=t;}
00218
00220
00227 virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
00228 {
00229 this->AllocatedRenderTime = t;
00230 this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
00231 this->EstimatedRenderTime = 0.0;
00232 }
00234
00236
00238 vtkGetMacro(AllocatedRenderTime, double);
00240
00242
00246 void SetRenderTimeMultiplier( double t ) { this->RenderTimeMultiplier = t; }
00247 vtkGetMacro(RenderTimeMultiplier, double);
00249
00253 virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00254
00256
00257 vtkGetMacro(NumberOfConsumers,int);
00259
00261
00262 void AddConsumer(vtkObject *c);
00263 void RemoveConsumer(vtkObject *c);
00264 vtkObject *GetConsumer(int i);
00265 int IsConsumer(vtkObject *c);
00267
00268
00269
00270 protected:
00271 vtkProp();
00272 ~vtkProp();
00273
00274 int Visibility;
00275 int Pickable;
00276 int Dragable;
00277
00278 double AllocatedRenderTime;
00279 double EstimatedRenderTime;
00280 double SavedEstimatedRenderTime;
00281 double RenderTimeMultiplier;
00282
00283
00284 int NumberOfConsumers;
00285 vtkObject **Consumers;
00286
00287
00288
00289 vtkAssemblyPaths *Paths;
00290
00291 private:
00292 vtkProp(const vtkProp&);
00293 void operator=(const vtkProp&);
00294 };
00295
00296 #endif
00297
00298