00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkPolyDataSilhouette_h
00038 #define __vtkPolyDataSilhouette_h
00039
00040 #include "vtkPolyDataAlgorithm.h"
00041
00042 #define VTK_DIRECTION_SPECIFIED_VECTOR 0
00043 #define VTK_DIRECTION_SPECIFIED_ORIGIN 1
00044 #define VTK_DIRECTION_CAMERA_ORIGIN 2
00045 #define VTK_DIRECTION_CAMERA_VECTOR 3
00046
00047 class vtkCamera;
00048 class vtkProp3D;
00049 class vtkTransform;
00050 class vtkPolyDataEdges;
00051
00052 class VTK_HYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
00053 {
00054 public:
00056 static vtkPolyDataSilhouette *New();
00057
00058 vtkTypeMacro(vtkPolyDataSilhouette,vtkPolyDataAlgorithm);
00059 void PrintSelf(ostream& os, vtkIndent indent);
00060
00062
00063 vtkSetMacro(EnableFeatureAngle,int);
00064 vtkGetMacro(EnableFeatureAngle,int);
00066
00068
00069 vtkSetMacro(FeatureAngle,double);
00070 vtkGetMacro(FeatureAngle,double);
00072
00074
00076 vtkSetMacro(BorderEdges,int);
00077 vtkGetMacro(BorderEdges,int);
00078 vtkBooleanMacro(BorderEdges,int);
00080
00082
00084 vtkSetMacro(PieceInvariant,int);
00085 vtkGetMacro(PieceInvariant,int);
00086 vtkBooleanMacro(PieceInvariant,int);
00088
00090
00092 vtkSetMacro(Direction,int);
00093 vtkGetMacro(Direction,int);
00094 void SetDirectionToSpecifiedVector()
00095 {this->SetDirection( VTK_DIRECTION_SPECIFIED_VECTOR ); }
00096 void SetDirectionToSpecifiedOrigin()
00097 {this->SetDirection( VTK_DIRECTION_SPECIFIED_ORIGIN ); }
00098 void SetDirectionToCameraVector()
00099 {this->SetDirection( VTK_DIRECTION_CAMERA_VECTOR ); }
00100 void SetDirectionToCameraOrigin()
00101 {this->SetDirection( VTK_DIRECTION_CAMERA_ORIGIN ); }
00103
00105
00109 virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
00110 vtkGetObjectMacro(Camera,vtkCamera VTK_WRAP_EXTERN);
00112
00114
00119 void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
00120 vtkProp3D VTK_WRAP_EXTERN*GetProp3D();
00122
00124
00127 vtkSetVector3Macro(Vector,double);
00128 vtkGetVectorMacro(Vector,double,3);
00130
00132
00136 vtkSetVector3Macro(Origin,double);
00137 vtkGetVectorMacro(Origin,double,3);
00139
00142 unsigned long GetMTime();
00143
00144 protected:
00145 vtkPolyDataSilhouette();
00146 ~vtkPolyDataSilhouette();
00147
00148 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00149 void ComputeProjectionVector(double vector[3], double origin[3]);
00150
00151 int Direction;
00152 vtkCamera *Camera;
00153 vtkProp3D *Prop3D;
00154 vtkTransform *Transform;
00155 double Vector[3];
00156 double Origin[3];
00157
00158 int EnableFeatureAngle;
00159 double FeatureAngle;
00160
00161 int BorderEdges;
00162 int PieceInvariant;
00163
00164 vtkPolyDataEdges* PreComp;
00165
00166 private:
00167 vtkPolyDataSilhouette(const vtkPolyDataSilhouette&);
00168 void operator=(const vtkPolyDataSilhouette&);
00169 };
00170
00171 #endif