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 =========================================================================*/
37 #ifndef vtkDepthSortPolyData_h
38 #define vtkDepthSortPolyData_h
39 
40 #include "vtkFiltersHybridModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class vtkCamera;
44 class vtkProp3D;
45 class vtkTransform;
46 
47 class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
48 {
49 public:
53  static vtkDepthSortPolyData *New();
54 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59  {
60  VTK_DIRECTION_BACK_TO_FRONT = 0,
61  VTK_DIRECTION_FRONT_TO_BACK = 1,
62  VTK_DIRECTION_SPECIFIED_VECTOR = 2
63  };
64 
66 
70  vtkSetMacro(Direction,int);
71  vtkGetMacro(Direction,int);
73  {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
75  {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
77  {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
79 
80  enum SortMode
81  {
82  VTK_SORT_FIRST_POINT = 0,
83  VTK_SORT_BOUNDS_CENTER = 1,
84  VTK_SORT_PARAMETRIC_CENTER = 2
85  };
86 
88 
94  vtkSetMacro(DepthSortMode,int);
95  vtkGetMacro(DepthSortMode,int);
97  {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
99  {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
101  {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
103 
105 
110  virtual void SetCamera(vtkCamera*);
111  vtkGetObjectMacro(Camera,vtkCamera);
113 
120  void SetProp3D(vtkProp3D *);
122  { return this->Prop3D; }
123 
125 
130  vtkSetVector3Macro(Vector,double);
131  vtkGetVectorMacro(Vector,double,3);
133 
135 
141  vtkSetVector3Macro(Origin,double);
142  vtkGetVectorMacro(Origin,double,3);
144 
146 
152  vtkSetMacro(SortScalars, vtkTypeBool);
153  vtkGetMacro(SortScalars, vtkTypeBool);
154  vtkBooleanMacro(SortScalars, vtkTypeBool);
156 
161  vtkMTimeType GetMTime() override;
162 
163 protected:
165  ~vtkDepthSortPolyData() override;
166 
168  void ComputeProjectionVector(double vector[3], double origin[3]);
169 
175  double Vector[3];
176  double Origin[3];
178 
179 private:
181  void operator=(const vtkDepthSortPolyData&) = delete;
182 };
183 
184 #endif
void SetDepthSortModeToFirstPoint()
Specify the point to use when sorting.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:304
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:60
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
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:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
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.