VTK  9.2.6
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 =========================================================================*/
34 #ifndef vtkDepthSortPolyData_h
35 #define vtkDepthSortPolyData_h
36 
37 #include "vtkFiltersHybridModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 
40 class vtkCamera;
41 class vtkProp3D;
42 class vtkTransform;
43 
44 class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
45 {
46 public:
50  static vtkDepthSortPolyData* New();
51 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56  {
57  VTK_DIRECTION_BACK_TO_FRONT = 0,
58  VTK_DIRECTION_FRONT_TO_BACK = 1,
59  VTK_DIRECTION_SPECIFIED_VECTOR = 2
60  };
61 
63 
67  vtkSetMacro(Direction, int);
68  vtkGetMacro(Direction, int);
69  void SetDirectionToFrontToBack() { this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK); }
70  void SetDirectionToBackToFront() { this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT); }
71  void SetDirectionToSpecifiedVector() { 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);
90  void SetDepthSortModeToFirstPoint() { this->SetDepthSortMode(VTK_SORT_FIRST_POINT); }
91  void SetDepthSortModeToBoundsCenter() { this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER); }
92  void SetDepthSortModeToParametricCenter() { this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER); }
94 
96 
101  virtual void SetCamera(vtkCamera*);
102  vtkGetObjectMacro(Camera, vtkCamera);
104 
111  void SetProp3D(vtkProp3D*);
112  vtkProp3D* GetProp3D() { return this->Prop3D; }
113 
115 
120  vtkSetVector3Macro(Vector, double);
121  vtkGetVectorMacro(Vector, double, 3);
123 
125 
131  vtkSetVector3Macro(Origin, double);
132  vtkGetVectorMacro(Origin, double, 3);
134 
136 
142  vtkSetMacro(SortScalars, vtkTypeBool);
143  vtkGetMacro(SortScalars, vtkTypeBool);
144  vtkBooleanMacro(SortScalars, vtkTypeBool);
146 
151  vtkMTimeType GetMTime() override;
152 
153 protected:
155  ~vtkDepthSortPolyData() override;
156 
158  void ComputeProjectionVector(double direction[3], double origin[3]);
159 
165  double Vector[3];
166  double Origin[3];
168 
169 private:
171  void operator=(const vtkDepthSortPolyData&) = delete;
172 };
173 
174 #endif
void SetDepthSortModeToFirstPoint()
Specify the point to use when sorting.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
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:49
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.