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 *);
107  { return this->Prop3D; }
109 
111 
114  vtkSetVector3Macro(Vector,double);
115  vtkGetVectorMacro(Vector,double,3);
117 
119 
123  vtkSetVector3Macro(Origin,double);
124  vtkGetVectorMacro(Origin,double,3);
126 
128 
132  vtkSetMacro(SortScalars, int);
133  vtkGetMacro(SortScalars, int);
134  vtkBooleanMacro(SortScalars, int);
136 
139  unsigned long GetMTime();
140 
141 protected:
144 
146  void ComputeProjectionVector(double vector[3], double origin[3]);
147 
153  double Vector[3];
154  double Origin[3];
156 
157 private:
158  vtkDepthSortPolyData(const vtkDepthSortPolyData&); // Not implemented.
159  void operator=(const vtkDepthSortPolyData&); // Not implemented.
160 };
161 
162 #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:49
#define VTK_SORT_FIRST_POINT
Store zero or more vtkInformation instances.
#define VTK_DIRECTION_SPECIFIED_VECTOR