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:
58  static vtkDepthSortPolyData *New();
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*);
96  vtkGetObjectMacro(Camera,vtkCamera);
98 
100 
105  void SetProp3D(vtkProp3D *);
106  vtkProp3D *GetProp3D();
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
#define VTK_SORT_BOUNDS_CENTER
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_DIRECTION_BACK_TO_FRONT
sort poly data along camera view direction
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:42
#define VTK_DIRECTION_FRONT_TO_BACK
#define VTK_SORT_PARAMETRIC_CENTER
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSHYBRID_EXPORT
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
#define VTK_SORT_FIRST_POINT
Store zero or more vtkInformation instances.
#define VTK_DIRECTION_SPECIFIED_VECTOR