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:
54 
56  void PrintSelf(ostream& os, vtkIndent indent);
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 
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, int);
153  vtkGetMacro(SortScalars, int);
154  vtkBooleanMacro(SortScalars, int);
156 
162 
163 protected:
166 
168  void ComputeProjectionVector(double vector[3], double origin[3]);
169 
175  double Vector[3];
176  double Origin[3];
178 
179 private:
180  vtkDepthSortPolyData(const vtkDepthSortPolyData&) VTK_DELETE_FUNCTION;
181  void operator=(const vtkDepthSortPolyData&) VTK_DELETE_FUNCTION;
182 };
183 
184 #endif
vtkDepthSortPolyData::GetMTime
vtkMTimeType GetMTime()
Return MTime also considering the dependent objects: the camera and/or the prop3D.
vtkDepthSortPolyData::~vtkDepthSortPolyData
~vtkDepthSortPolyData()
vtkDepthSortPolyData::SetDepthSortModeToBoundsCenter
void SetDepthSortModeToBoundsCenter()
Definition: vtkDepthSortPolyData.h:98
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkDepthSortPolyData
sort poly data along camera view direction
Definition: vtkDepthSortPolyData.h:48
vtkDepthSortPolyData::SetDirectionToFrontToBack
void SetDirectionToFrontToBack()
Definition: vtkDepthSortPolyData.h:72
vtkDepthSortPolyData::SetDirectionToBackToFront
void SetDirectionToBackToFront()
Definition: vtkDepthSortPolyData.h:74
vtkDepthSortPolyData::GetProp3D
vtkProp3D * GetProp3D()
Definition: vtkDepthSortPolyData.h:121
vtkDepthSortPolyData::vtkDepthSortPolyData
vtkDepthSortPolyData()
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
vtkDepthSortPolyData::Transform
vtkTransform * Transform
Definition: vtkDepthSortPolyData.h:174
vtkDepthSortPolyData::New
static vtkDepthSortPolyData * New()
Instantiate object.
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkPolyDataAlgorithm.h
vtkDepthSortPolyData::DepthSortMode
int DepthSortMode
Definition: vtkDepthSortPolyData.h:171
vtkDepthSortPolyData::Camera
vtkCamera * Camera
Definition: vtkDepthSortPolyData.h:172
vtkDepthSortPolyData::Prop3D
vtkProp3D * Prop3D
Definition: vtkDepthSortPolyData.h:173
vtkDepthSortPolyData::SetCamera
virtual void SetCamera(vtkCamera *)
Specify a camera that is used to define a view direction along which the cells are sorted.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkDepthSortPolyData::Direction
int Direction
Definition: vtkDepthSortPolyData.h:170
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
vtkDepthSortPolyData::SortScalars
int SortScalars
Definition: vtkDepthSortPolyData.h:177
vtkDepthSortPolyData::SetProp3D
void SetProp3D(vtkProp3D *)
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkDepthSortPolyData::SortMode
SortMode
Definition: vtkDepthSortPolyData.h:81
vtkDepthSortPolyData::ComputeProjectionVector
void ComputeProjectionVector(double vector[3], double origin[3])
vtkDepthSortPolyData::Directions
Directions
Definition: vtkDepthSortPolyData.h:59
vtkDepthSortPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDepthSortPolyData::SetDepthSortModeToParametricCenter
void SetDepthSortModeToParametricCenter()
Definition: vtkDepthSortPolyData.h:100
vtkDepthSortPolyData::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkDepthSortPolyData::SetDepthSortModeToFirstPoint
void SetDepthSortModeToFirstPoint()
Definition: vtkDepthSortPolyData.h:96
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45
vtkDepthSortPolyData::SetDirectionToSpecifiedVector
void SetDirectionToSpecifiedVector()
Definition: vtkDepthSortPolyData.h:76