00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00045 #ifndef __vtkVisibilitySort_h
00046 #define __vtkVisibilitySort_h
00047
00048 #include "vtkObject.h"
00049
00050 class vtkIdTypeArray;
00051 class vtkDataSet;
00052 class vtkMatrix4x4;
00053 class vtkCamera;
00054
00055 class VTK_RENDERING_EXPORT vtkVisibilitySort : public vtkObject
00056 {
00057 public:
00058 vtkTypeRevisionMacro(vtkVisibilitySort, vtkObject);
00059 virtual void PrintSelf(ostream &os, vtkIndent indent);
00060
00062
00071 virtual void InitTraversal() = 0;
00072 virtual vtkIdTypeArray *GetNextCells() = 0;
00074
00076
00078 vtkSetClampMacro(MaxCellsReturned, int, 1, VTK_LARGE_INTEGER);
00079 vtkGetMacro(MaxCellsReturned, int);
00081
00083
00086 virtual void SetModelTransform(vtkMatrix4x4 *mat);
00087 vtkGetObjectMacro(ModelTransform, vtkMatrix4x4);
00089
00090 vtkGetObjectMacro(InverseModelTransform, vtkMatrix4x4);
00091
00093
00094 virtual void SetCamera(vtkCamera *camera);
00095 vtkGetObjectMacro(Camera, vtkCamera);
00097
00099
00100 virtual void SetInput(vtkDataSet *data);
00101 vtkGetObjectMacro(Input, vtkDataSet);
00103
00105
00107 vtkGetMacro(Direction, int);
00108 vtkSetMacro(Direction, int);
00109 void SetDirectionToBackToFront() { this->SetDirection(BACK_TO_FRONT); }
00110 void SetDirectionToFrontToBack() { this->SetDirection(FRONT_TO_BACK); }
00112
00113
00114 enum { BACK_TO_FRONT, FRONT_TO_BACK };
00115
00116
00118
00119 virtual void Register(vtkObjectBase *o);
00120 virtual void UnRegister(vtkObjectBase *o);
00122
00123 protected:
00124 vtkVisibilitySort();
00125 virtual ~vtkVisibilitySort();
00126
00127 vtkTimeStamp LastSortTime;
00128
00129 vtkMatrix4x4 *ModelTransform;
00130 vtkMatrix4x4 *InverseModelTransform;
00131 vtkCamera *Camera;
00132 vtkDataSet *Input;
00133
00134 int MaxCellsReturned;
00135
00136 int Direction;
00137
00138 virtual void ReportReferences(vtkGarbageCollector *collector);
00139
00140 private:
00141 vtkVisibilitySort(const vtkVisibilitySort &);
00142 void operator=(const vtkVisibilitySort &);
00143 };
00144
00145 #endif //__vtkVisibilitySort_h
00146