VTK
vtkDepthSortPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDepthSortPolyData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
36 #ifndef __vtkDepthSortPolyData_h
37 #define __vtkDepthSortPolyData_h
38 
39 #include "vtkPolyDataAlgorithm.h"
40 
41 #define VTK_DIRECTION_BACK_TO_FRONT 0
42 #define VTK_DIRECTION_FRONT_TO_BACK 1
43 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
44 
45 #define VTK_SORT_FIRST_POINT 0
46 #define VTK_SORT_BOUNDS_CENTER 1
47 #define VTK_SORT_PARAMETRIC_CENTER 2
48 
49 class vtkCamera;
50 class vtkProp3D;
51 class vtkTransform;
52 
54 {
55 public:
57  static vtkDepthSortPolyData *New();
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
65  vtkSetMacro(Direction,int);
66  vtkGetMacro(Direction,int);
67  void SetDirectionToFrontToBack()
68  {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
69  void SetDirectionToBackToFront()
70  {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
71  void SetDirectionToSpecifiedVector()
72  {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
74 
76 
80  vtkSetMacro(DepthSortMode,int);
81  vtkGetMacro(DepthSortMode,int);
82  void SetDepthSortModeToFirstPoint()
83  {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
84  void SetDepthSortModeToBoundsCenter()
85  {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
86  void SetDepthSortModeToParametricCenter()
87  {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
89 
91 
94  virtual void SetCamera(vtkCamera*);
95  vtkGetObjectMacro(Camera,vtkCamera);
97 
99 
104  void SetProp3D(vtkProp3D *);
105  vtkProp3D *GetProp3D();
107 
109 
112  vtkSetVector3Macro(Vector,double);
113  vtkGetVectorMacro(Vector,double,3);
115 
117 
121  vtkSetVector3Macro(Origin,double);
122  vtkGetVectorMacro(Origin,double,3);
124 
126 
130  vtkSetMacro(SortScalars, int);
131  vtkGetMacro(SortScalars, int);
132  vtkBooleanMacro(SortScalars, int);
134 
137  unsigned long GetMTime();
138 
139 protected:
142 
144  void ComputeProjectionVector(double vector[3], double origin[3]);
145 
151  double Vector[3];
152  double Origin[3];
154 
155 private:
156  vtkDepthSortPolyData(const vtkDepthSortPolyData&); // Not implemented.
157  void operator=(const vtkDepthSortPolyData&); // Not implemented.
158 };
159 
160 #endif