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

dox/Common/vtkProp.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkProp.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00037 #ifndef __vtkProp_h 00038 #define __vtkProp_h 00039 00040 #include "vtkObject.h" 00041 00042 class vtkAssemblyPath; 00043 class vtkAssemblyPaths; 00044 class vtkMatrix4x4; 00045 class vtkPropCollection; 00046 class vtkViewport; 00047 class vtkWindow; 00048 00049 class VTK_COMMON_EXPORT vtkProp : public vtkObject 00050 { 00051 public: 00052 vtkTypeRevisionMacro(vtkProp,vtkObject); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00056 00059 virtual void GetActors(vtkPropCollection *) {} 00060 virtual void GetActors2D(vtkPropCollection *) {} 00061 virtual void GetVolumes(vtkPropCollection *) {} 00063 00065 00066 vtkSetMacro(Visibility, int); 00067 vtkGetMacro(Visibility, int); 00068 vtkBooleanMacro(Visibility, int); 00070 00072 00074 vtkSetMacro(Pickable,int); 00075 vtkGetMacro(Pickable,int); 00076 vtkBooleanMacro(Pickable,int); 00078 00080 00082 void SetPickMethod(void (*f)(void *), void *arg); 00083 void SetPickMethodArgDelete(void (*f)(void *)); 00085 00087 virtual void Pick(); 00088 00090 00096 vtkSetMacro(Dragable,int); 00097 vtkGetMacro(Dragable,int); 00098 vtkBooleanMacro(Dragable,int); 00100 00105 virtual unsigned long GetRedrawMTime() {return this->GetMTime();} 00106 00109 virtual float *GetBounds() {return NULL;} 00110 00112 virtual void ShallowCopy(vtkProp *prop); 00113 00115 00126 virtual void InitPathTraversal(); 00127 virtual vtkAssemblyPath *GetNextPath(); 00128 virtual int GetNumberOfPaths() {return 1;} 00130 00132 00135 virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {} 00136 virtual vtkMatrix4x4 *GetMatrix() {return NULL;} 00138 00139 //BTX 00141 00152 virtual int RenderOpaqueGeometry( vtkViewport *) { return 0; } 00153 virtual int RenderTranslucentGeometry( vtkViewport *) { return 0; } 00154 virtual int RenderOverlay( vtkViewport *) { return 0; } 00156 00161 virtual void ReleaseGraphicsResources(vtkWindow *) {} 00162 00164 00174 virtual float GetEstimatedRenderTime( vtkViewport * ) 00175 { return this->EstimatedRenderTime; } 00176 virtual float GetEstimatedRenderTime(){ return this->EstimatedRenderTime; } 00178 00180 00184 virtual void SetEstimatedRenderTime(float t) 00185 {this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;} 00187 00189 00194 virtual void RestoreEstimatedRenderTime() 00195 { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; } 00197 00198 00200 00210 virtual void AddEstimatedRenderTime(float t, vtkViewport *vtkNotUsed(vp)) 00211 {this->EstimatedRenderTime+=t;} 00213 00215 00222 virtual void SetAllocatedRenderTime(float t, vtkViewport *vtkNotUsed(v)) 00223 { 00224 this->AllocatedRenderTime = t; 00225 this->SavedEstimatedRenderTime = this->EstimatedRenderTime; 00226 this->EstimatedRenderTime = 0.0; 00227 } 00229 00231 00233 vtkGetMacro(AllocatedRenderTime, float); 00235 00237 00241 void SetRenderTimeMultiplier( float t ) { this->RenderTimeMultiplier = t; } 00242 vtkGetMacro(RenderTimeMultiplier, float); 00244 00248 virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path); 00249 00251 00252 vtkGetMacro(NumberOfConsumers,int); 00254 00256 00257 void AddConsumer(vtkObject *c); 00258 void RemoveConsumer(vtkObject *c); 00259 vtkObject *GetConsumer(int i); 00260 int IsConsumer(vtkObject *c); 00262 00263 //ETX 00264 00265 protected: 00266 vtkProp(); 00267 ~vtkProp(); 00268 00269 int Visibility; 00270 int Pickable; 00271 unsigned long PickTag; 00272 int Dragable; 00273 00274 float AllocatedRenderTime; 00275 float EstimatedRenderTime; 00276 float SavedEstimatedRenderTime; 00277 float RenderTimeMultiplier; 00278 00279 // how many consumers does this object have 00280 int NumberOfConsumers; 00281 vtkObject **Consumers; 00282 00283 // support multi-part props and access to paths of prop 00284 // stuff that follows is used to build the assembly hierarchy 00285 vtkAssemblyPaths *Paths; 00286 00287 private: 00288 vtkProp(const vtkProp&); // Not implemented. 00289 void operator=(const vtkProp&); // Not implemented. 00290 }; 00291 00292 #endif 00293 00294