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 =========================================================================*/
36 #ifndef vtkDepthSortPolyData_h
37 #define vtkDepthSortPolyData_h
38 
39 #include "vtkFiltersHybridModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 
42 #define VTK_DIRECTION_BACK_TO_FRONT 0
43 #define VTK_DIRECTION_FRONT_TO_BACK 1
44 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
45 
46 #define VTK_SORT_FIRST_POINT 0
47 #define VTK_SORT_BOUNDS_CENTER 1
48 #define VTK_SORT_PARAMETRIC_CENTER 2
49 
50 class vtkCamera;
51 class vtkProp3D;
52 class vtkTransform;
53 
55 {
56 public:
59 
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
66  vtkSetMacro(Direction,int);
67  vtkGetMacro(Direction,int);
69  {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
71  {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
73  {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
75 
77 
81  vtkSetMacro(DepthSortMode,int);
82  vtkGetMacro(DepthSortMode,int);
84  {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
86  {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
88  {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
90 
92 
95  virtual void SetCamera(vtkCamera*);
98 
100 
108 
110 
113  vtkSetVector3Macro(Vector,double);
114  vtkGetVectorMacro(Vector,double,3);
116 
118 
122  vtkSetVector3Macro(Origin,double);
123  vtkGetVectorMacro(Origin,double,3);
125 
127 
131  vtkSetMacro(SortScalars, int);
132  vtkGetMacro(SortScalars, int);
133  vtkBooleanMacro(SortScalars, int);
135 
138  unsigned long GetMTime();
139 
140 protected:
143 
145  void ComputeProjectionVector(double vector[3], double origin[3]);
146 
152  double Vector[3];
153  double Origin[3];
155 
156 private:
157  vtkDepthSortPolyData(const vtkDepthSortPolyData&); // Not implemented.
158  void operator=(const vtkDepthSortPolyData&); // Not implemented.
159 };
160 
161 #endif
VTK_DIRECTION_BACK_TO_FRONT
#define VTK_DIRECTION_BACK_TO_FRONT
Definition: vtkDepthSortPolyData.h:42
vtkDepthSortPolyData::~vtkDepthSortPolyData
~vtkDepthSortPolyData()
vtkDepthSortPolyData::SetDepthSortModeToBoundsCenter
void SetDepthSortModeToBoundsCenter()
Definition: vtkDepthSortPolyData.h:85
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkDepthSortPolyData
sort poly data along camera view direction
Definition: vtkDepthSortPolyData.h:55
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
VTK_DIRECTION_FRONT_TO_BACK
#define VTK_DIRECTION_FRONT_TO_BACK
Definition: vtkDepthSortPolyData.h:43
vtkDepthSortPolyData::SetDirectionToFrontToBack
void SetDirectionToFrontToBack()
Definition: vtkDepthSortPolyData.h:68
VTK_DIRECTION_SPECIFIED_VECTOR
#define VTK_DIRECTION_SPECIFIED_VECTOR
Definition: vtkDepthSortPolyData.h:44
vtkDepthSortPolyData::SetDirectionToBackToFront
void SetDirectionToBackToFront()
Definition: vtkDepthSortPolyData.h:70
VTK_SORT_FIRST_POINT
#define VTK_SORT_FIRST_POINT
Definition: vtkDepthSortPolyData.h:46
vtkDepthSortPolyData::GetProp3D
vtkProp3D * GetProp3D()
vtkDepthSortPolyData::vtkDepthSortPolyData
vtkDepthSortPolyData()
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkDepthSortPolyData::Transform
vtkTransform * Transform
Definition: vtkDepthSortPolyData.h:151
vtkDepthSortPolyData::New
static vtkDepthSortPolyData * New()
VTK_SORT_BOUNDS_CENTER
#define VTK_SORT_BOUNDS_CENTER
Definition: vtkDepthSortPolyData.h:47
vtkPolyDataAlgorithm.h
VTKFILTERSHYBRID_EXPORT
#define VTKFILTERSHYBRID_EXPORT
Definition: vtkFiltersHybridModule.h:15
vtkDepthSortPolyData::DepthSortMode
int DepthSortMode
Definition: vtkDepthSortPolyData.h:148
vtkDepthSortPolyData::Camera
vtkCamera * Camera
Definition: vtkDepthSortPolyData.h:149
vtkDepthSortPolyData::Prop3D
vtkProp3D * Prop3D
Definition: vtkDepthSortPolyData.h:150
vtkDepthSortPolyData::SetCamera
virtual void SetCamera(vtkCamera *)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDepthSortPolyData::Direction
int Direction
Definition: vtkDepthSortPolyData.h:147
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
vtkDepthSortPolyData::SortScalars
int SortScalars
Definition: vtkDepthSortPolyData.h:154
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDepthSortPolyData::SetProp3D
void SetProp3D(vtkProp3D *)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDepthSortPolyData::GetMTime
unsigned long GetMTime()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
VTK_SORT_PARAMETRIC_CENTER
#define VTK_SORT_PARAMETRIC_CENTER
Definition: vtkDepthSortPolyData.h:48
vtkFiltersHybridModule.h
vtkDepthSortPolyData::ComputeProjectionVector
void ComputeProjectionVector(double vector[3], double origin[3])
vtkDepthSortPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkDepthSortPolyData::SetDepthSortModeToParametricCenter
void SetDepthSortModeToParametricCenter()
Definition: vtkDepthSortPolyData.h:87
vtkDepthSortPolyData::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDepthSortPolyData::SetDepthSortModeToFirstPoint
void SetDepthSortModeToFirstPoint()
Definition: vtkDepthSortPolyData.h:83
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44
vtkDepthSortPolyData::SetDirectionToSpecifiedVector
void SetDirectionToSpecifiedVector()
Definition: vtkDepthSortPolyData.h:72