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 =========================================================================*/
31 #ifndef vtkDepthSortPolyData_h
32 #define vtkDepthSortPolyData_h
33 
34 #include "vtkFiltersHybridModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 class vtkCamera;
38 class vtkProp3D;
39 class vtkTransform;
40 
41 class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
42 {
43 public:
47  static vtkDepthSortPolyData *New();
48 
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53  {
54  VTK_DIRECTION_BACK_TO_FRONT = 0,
55  VTK_DIRECTION_FRONT_TO_BACK = 1,
56  VTK_DIRECTION_SPECIFIED_VECTOR = 2
57  };
58 
60 
64  vtkSetMacro(Direction,int);
65  vtkGetMacro(Direction,int);
67  {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
69  {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
71  {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
73 
74  enum SortMode
75  {
76  VTK_SORT_FIRST_POINT = 0,
77  VTK_SORT_BOUNDS_CENTER = 1,
78  VTK_SORT_PARAMETRIC_CENTER = 2
79  };
80 
82 
88  vtkSetMacro(DepthSortMode,int);
89  vtkGetMacro(DepthSortMode,int);
91  {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
93  {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
95  {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
97 
99 
104  virtual void SetCamera(vtkCamera*);
105  vtkGetObjectMacro(Camera,vtkCamera);
107 
114  void SetProp3D(vtkProp3D *);
116  { return this->Prop3D; }
117 
119 
124  vtkSetVector3Macro(Vector,double);
125  vtkGetVectorMacro(Vector,double,3);
127 
129 
135  vtkSetVector3Macro(Origin,double);
136  vtkGetVectorMacro(Origin,double,3);
138 
140 
146  vtkSetMacro(SortScalars, vtkTypeBool);
147  vtkGetMacro(SortScalars, vtkTypeBool);
148  vtkBooleanMacro(SortScalars, vtkTypeBool);
150 
155  vtkMTimeType GetMTime() override;
156 
157 protected:
159  ~vtkDepthSortPolyData() override;
160 
162  void ComputeProjectionVector(double vector[3], double origin[3]);
163 
169  double Vector[3];
170  double Origin[3];
172 
173 private:
175  void operator=(const vtkDepthSortPolyData&) = delete;
176 };
177 
178 #endif
void SetDepthSortModeToFirstPoint()
Specify the point to use when sorting.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
sort poly data along camera view direction
void SetDirectionToBackToFront()
Specify the sort method for the polygonal primitives.
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
void SetDepthSortModeToBoundsCenter()
Specify the point to use when sorting.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetDirectionToFrontToBack()
Specify the sort method for the polygonal primitives.
Store zero or more vtkInformation instances.
void SetDirectionToSpecifiedVector()
Specify the sort method for the polygonal primitives.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDepthSortModeToParametricCenter()
Specify the point to use when sorting.