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

vtkDepthSortPolyData.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDepthSortPolyData.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 =========================================================================*/
00040 #ifndef __vtkDepthSortPolyData_h
00041 #define __vtkDepthSortPolyData_h
00042 
00043 #include "vtkPolyDataToPolyDataFilter.h"
00044 
00045 #define VTK_DIRECTION_BACK_TO_FRONT 0
00046 #define VTK_DIRECTION_FRONT_TO_BACK 1
00047 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
00048 
00049 #define VTK_SORT_FIRST_POINT 0
00050 #define VTK_SORT_BOUNDS_CENTER 1
00051 #define VTK_SORT_PARAMETRIC_CENTER 2
00052 
00053 class vtkCamera;
00054 class vtkProp3D;
00055 class vtkTransform;
00056 
00057 class VTK_HYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataToPolyDataFilter 
00058 {
00059 public:
00061   static vtkDepthSortPolyData *New();
00062 
00063   vtkTypeRevisionMacro(vtkDepthSortPolyData,vtkPolyDataToPolyDataFilter);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00067 
00069   vtkSetMacro(Direction,int);
00070   vtkGetMacro(Direction,int);
00071   void SetDirectionToFrontToBack() 
00072     {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
00073   void SetDirectionToBackToFront() 
00074     {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
00075   void SetDirectionToSpecifiedVector() 
00076     {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
00078 
00080 
00084   vtkSetMacro(DepthSortMode,int);
00085   vtkGetMacro(DepthSortMode,int);
00086   void SetDepthSortModeToFirstPoint() 
00087     {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
00088   void SetDepthSortModeToBoundsCenter() 
00089     {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
00090   void SetDepthSortModeToParametricCenter() 
00091     {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
00093 
00095 
00098   virtual void SetCamera(vtkCamera*);
00099   vtkGetObjectMacro(Camera,vtkCamera);
00101 
00103 
00108   void SetProp3D(vtkProp3D *);
00109   vtkProp3D *GetProp3D();
00111 
00113 
00116   vtkSetVector3Macro(Vector,double);
00117   vtkGetVectorMacro(Vector,double,3);
00119 
00121 
00125   vtkSetVector3Macro(Origin,double);
00126   vtkGetVectorMacro(Origin,double,3);
00128 
00130 
00134   vtkSetMacro(SortScalars, int);
00135   vtkGetMacro(SortScalars, int);
00136   vtkBooleanMacro(SortScalars, int);
00138 
00141   unsigned long GetMTime();
00142 
00143 protected:
00144   vtkDepthSortPolyData();
00145   ~vtkDepthSortPolyData();
00146 
00147   void Execute();
00148   void ComputeProjectionVector(double vector[3], double origin[3]);
00149 
00150   int Direction;
00151   int DepthSortMode;
00152   vtkCamera *Camera;
00153   vtkProp3D *Prop3D;
00154   vtkTransform *Transform;
00155   double Vector[3];
00156   double Origin[3];
00157   int SortScalars;
00158   
00159 private:
00160   vtkDepthSortPolyData(const vtkDepthSortPolyData&);  // Not implemented.
00161   void operator=(const vtkDepthSortPolyData&);  // Not implemented.
00162 };
00163 
00164 #endif