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
vtkDepthSortPolyData::SetDepthSortModeToBoundsCenter
void SetDepthSortModeToBoundsCenter()
Definition: vtkDepthSortPolyData.h:98
vtkX3D::vector
Definition: vtkX3D.h:237
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkDepthSortPolyData
sort poly data along camera view direction
Definition: vtkDepthSortPolyData.h:47
vtkDepthSortPolyData::SetDirectionToFrontToBack
void SetDirectionToFrontToBack()
Definition: vtkDepthSortPolyData.h:72
vtkDepthSortPolyData::SetDirectionToBackToFront
void SetDirectionToBackToFront()
Definition: vtkDepthSortPolyData.h:74
vtkDepthSortPolyData::GetProp3D
vtkProp3D * GetProp3D()
Definition: vtkDepthSortPolyData.h:121
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDepthSortPolyData::Transform
vtkTransform * Transform
Definition: vtkDepthSortPolyData.h:174
vtkPolyDataAlgorithm.h
vtkDepthSortPolyData::DepthSortMode
int DepthSortMode
Definition: vtkDepthSortPolyData.h:171
vtkDepthSortPolyData::Camera
vtkCamera * Camera
Definition: vtkDepthSortPolyData.h:172
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkDepthSortPolyData::Prop3D
vtkProp3D * Prop3D
Definition: vtkDepthSortPolyData.h:173
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDepthSortPolyData::Direction
int Direction
Definition: vtkDepthSortPolyData.h:170
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDepthSortPolyData::SortScalars
vtkTypeBool SortScalars
Definition: vtkDepthSortPolyData.h:177
vtkDepthSortPolyData::SortMode
SortMode
Definition: vtkDepthSortPolyData.h:80
vtkDepthSortPolyData::Directions
Directions
Definition: vtkDepthSortPolyData.h:58
vtkDepthSortPolyData::SetDepthSortModeToParametricCenter
void SetDepthSortModeToParametricCenter()
Definition: vtkDepthSortPolyData.h:100
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkDepthSortPolyData::SetDepthSortModeToFirstPoint
void SetDepthSortModeToFirstPoint()
Definition: vtkDepthSortPolyData.h:96
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44
vtkDepthSortPolyData::SetDirectionToSpecifiedVector
void SetDirectionToSpecifiedVector()
Definition: vtkDepthSortPolyData.h:76