00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkDepthSortPolyData_h
00037 #define __vtkDepthSortPolyData_h
00038
00039 #include "vtkPolyDataAlgorithm.h"
00040
00041 #define VTK_DIRECTION_BACK_TO_FRONT 0
00042 #define VTK_DIRECTION_FRONT_TO_BACK 1
00043 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
00044
00045 #define VTK_SORT_FIRST_POINT 0
00046 #define VTK_SORT_BOUNDS_CENTER 1
00047 #define VTK_SORT_PARAMETRIC_CENTER 2
00048
00049 class vtkCamera;
00050 class vtkProp3D;
00051 class vtkTransform;
00052
00053 class VTK_HYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
00054 {
00055 public:
00057 static vtkDepthSortPolyData *New();
00058
00059 vtkTypeMacro(vtkDepthSortPolyData,vtkPolyDataAlgorithm);
00060 void PrintSelf(ostream& os, vtkIndent indent);
00061
00063
00065 vtkSetMacro(Direction,int);
00066 vtkGetMacro(Direction,int);
00067 void SetDirectionToFrontToBack()
00068 {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
00069 void SetDirectionToBackToFront()
00070 {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
00071 void SetDirectionToSpecifiedVector()
00072 {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
00074
00076
00080 vtkSetMacro(DepthSortMode,int);
00081 vtkGetMacro(DepthSortMode,int);
00082 void SetDepthSortModeToFirstPoint()
00083 {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
00084 void SetDepthSortModeToBoundsCenter()
00085 {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
00086 void SetDepthSortModeToParametricCenter()
00087 {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
00089
00091
00094 virtual void SetCamera(vtkCamera*);
00095 vtkGetObjectMacro(Camera,vtkCamera);
00097
00099
00104 void SetProp3D(vtkProp3D *);
00105 vtkProp3D *GetProp3D();
00107
00109
00112 vtkSetVector3Macro(Vector,double);
00113 vtkGetVectorMacro(Vector,double,3);
00115
00117
00121 vtkSetVector3Macro(Origin,double);
00122 vtkGetVectorMacro(Origin,double,3);
00124
00126
00130 vtkSetMacro(SortScalars, int);
00131 vtkGetMacro(SortScalars, int);
00132 vtkBooleanMacro(SortScalars, int);
00134
00137 unsigned long GetMTime();
00138
00139 protected:
00140 vtkDepthSortPolyData();
00141 ~vtkDepthSortPolyData();
00142
00143 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00144 void ComputeProjectionVector(double vector[3], double origin[3]);
00145
00146 int Direction;
00147 int DepthSortMode;
00148 vtkCamera *Camera;
00149 vtkProp3D *Prop3D;
00150 vtkTransform *Transform;
00151 double Vector[3];
00152 double Origin[3];
00153 int SortScalars;
00154
00155 private:
00156 vtkDepthSortPolyData(const vtkDepthSortPolyData&);
00157 void operator=(const vtkDepthSortPolyData&);
00158 };
00159
00160 #endif