VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Hybrid/vtkDepthSortPolyData.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDepthSortPolyData.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00036 #ifndef vtkDepthSortPolyData_h
00037 #define vtkDepthSortPolyData_h
00038 
00039 #include "vtkFiltersHybridModule.h" // For export macro
00040 #include "vtkPolyDataAlgorithm.h"
00041 
00042 #define VTK_DIRECTION_BACK_TO_FRONT 0
00043 #define VTK_DIRECTION_FRONT_TO_BACK 1
00044 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
00045 
00046 #define VTK_SORT_FIRST_POINT 0
00047 #define VTK_SORT_BOUNDS_CENTER 1
00048 #define VTK_SORT_PARAMETRIC_CENTER 2
00049 
00050 class vtkCamera;
00051 class vtkProp3D;
00052 class vtkTransform;
00053 
00054 class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
00055 {
00056 public:
00058   static vtkDepthSortPolyData *New();
00059 
00060   vtkTypeMacro(vtkDepthSortPolyData,vtkPolyDataAlgorithm);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00066   vtkSetMacro(Direction,int);
00067   vtkGetMacro(Direction,int);
00068   void SetDirectionToFrontToBack()
00069     {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
00070   void SetDirectionToBackToFront()
00071     {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
00072   void SetDirectionToSpecifiedVector()
00073     {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
00075 
00077 
00081   vtkSetMacro(DepthSortMode,int);
00082   vtkGetMacro(DepthSortMode,int);
00083   void SetDepthSortModeToFirstPoint()
00084     {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
00085   void SetDepthSortModeToBoundsCenter()
00086     {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
00087   void SetDepthSortModeToParametricCenter()
00088     {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
00090 
00092 
00095   virtual void SetCamera(vtkCamera*);
00096   vtkGetObjectMacro(Camera,vtkCamera);
00098 
00100 
00105   void SetProp3D(vtkProp3D *);
00106   vtkProp3D *GetProp3D();
00108 
00110 
00113   vtkSetVector3Macro(Vector,double);
00114   vtkGetVectorMacro(Vector,double,3);
00116 
00118 
00122   vtkSetVector3Macro(Origin,double);
00123   vtkGetVectorMacro(Origin,double,3);
00125 
00127 
00131   vtkSetMacro(SortScalars, int);
00132   vtkGetMacro(SortScalars, int);
00133   vtkBooleanMacro(SortScalars, int);
00135 
00138   unsigned long GetMTime();
00139 
00140 protected:
00141   vtkDepthSortPolyData();
00142   ~vtkDepthSortPolyData();
00143 
00144   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00145   void ComputeProjectionVector(double vector[3], double origin[3]);
00146 
00147   int Direction;
00148   int DepthSortMode;
00149   vtkCamera *Camera;
00150   vtkProp3D *Prop3D;
00151   vtkTransform *Transform;
00152   double Vector[3];
00153   double Origin[3];
00154   int SortScalars;
00155 
00156 private:
00157   vtkDepthSortPolyData(const vtkDepthSortPolyData&);  // Not implemented.
00158   void operator=(const vtkDepthSortPolyData&);  // Not implemented.
00159 };
00160 
00161 #endif