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 "vtkPolyDataAlgorithm.h"
40 
41 #define VTK_DIRECTION_BACK_TO_FRONT 0
42 #define VTK_DIRECTION_FRONT_TO_BACK 1
43 #define VTK_DIRECTION_SPECIFIED_VECTOR 2
44 
45 #define VTK_SORT_FIRST_POINT 0
46 #define VTK_SORT_BOUNDS_CENTER 1
47 #define VTK_SORT_PARAMETRIC_CENTER 2
48 
49 class vtkCamera;
50 class vtkProp3D;
51 class vtkTransform;
52 
54 {
55 public:
57  static vtkDepthSortPolyData *New();
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
65  vtkSetMacro(Direction,int);
66  vtkGetMacro(Direction,int);
68  {this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK);}
70  {this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT);}
72  {this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR);}
74 
76 
80  vtkSetMacro(DepthSortMode,int);
81  vtkGetMacro(DepthSortMode,int);
83  {this->SetDepthSortMode(VTK_SORT_FIRST_POINT);}
85  {this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER);}
87  {this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER);}
89 
91 
94  virtual void SetCamera(vtkCamera*);
95  vtkGetObjectMacro(Camera,vtkCamera);
97 
99 
104  void SetProp3D(vtkProp3D *);
105  vtkProp3D *GetProp3D();
107 
109 
112  vtkSetVector3Macro(Vector,double);
113  vtkGetVectorMacro(Vector,double,3);
115 
117 
121  vtkSetVector3Macro(Origin,double);
122  vtkGetVectorMacro(Origin,double,3);
124 
126 
130  vtkSetMacro(SortScalars, int);
131  vtkGetMacro(SortScalars, int);
132  vtkBooleanMacro(SortScalars, int);
134 
137  unsigned long GetMTime();
138 
139 protected:
142 
144  void ComputeProjectionVector(double vector[3], double origin[3]);
145 
151  double Vector[3];
152  double Origin[3];
154 
155 private:
156  vtkDepthSortPolyData(const vtkDepthSortPolyData&); // Not implemented.
157  void operator=(const vtkDepthSortPolyData&); // Not implemented.
158 };
159 
160 #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:58
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:41
#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:37
a virtual camera for 3D rendering
Definition: vtkCamera.h:47
#define VTK_SORT_FIRST_POINT
Store zero or more vtkInformation instances.
#define VTK_DIRECTION_SPECIFIED_VECTOR
#define VTK_HYBRID_EXPORT