00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00040 #ifndef __vtkPolyDataSilhouette_h
00041 #define __vtkPolyDataSilhouette_h
00042
00043 #include "vtkPolyDataAlgorithm.h"
00044
00045 #define VTK_DIRECTION_SPECIFIED_VECTOR 0
00046 #define VTK_DIRECTION_SPECIFIED_ORIGIN 1
00047 #define VTK_DIRECTION_CAMERA_ORIGIN 2
00048 #define VTK_DIRECTION_CAMERA_VECTOR 3
00049
00050 class vtkCamera;
00051 class vtkProp3D;
00052 class vtkTransform;
00053 class vtkPolyDataEdges;
00054
00055 class VTK_HYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
00056 {
00057 public:
00059 static vtkPolyDataSilhouette *New();
00060
00061 vtkTypeMacro(vtkPolyDataSilhouette,vtkPolyDataAlgorithm);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00063
00065
00066 vtkSetMacro(EnableFeatureAngle,int);
00067 vtkGetMacro(EnableFeatureAngle,int);
00069
00071
00072 vtkSetMacro(FeatureAngle,double);
00073 vtkGetMacro(FeatureAngle,double);
00075
00077
00079 vtkSetMacro(BorderEdges,int);
00080 vtkGetMacro(BorderEdges,int);
00081 vtkBooleanMacro(BorderEdges,int);
00083
00085
00087 vtkSetMacro(PieceInvariant,int);
00088 vtkGetMacro(PieceInvariant,int);
00089 vtkBooleanMacro(PieceInvariant,int);
00091
00093
00095 vtkSetMacro(Direction,int);
00096 vtkGetMacro(Direction,int);
00097 void SetDirectionToSpecifiedVector()
00098 {this->SetDirection( VTK_DIRECTION_SPECIFIED_VECTOR ); }
00099 void SetDirectionToSpecifiedOrigin()
00100 {this->SetDirection( VTK_DIRECTION_SPECIFIED_ORIGIN ); }
00101 void SetDirectionToCameraVector()
00102 {this->SetDirection( VTK_DIRECTION_CAMERA_VECTOR ); }
00103 void SetDirectionToCameraOrigin()
00104 {this->SetDirection( VTK_DIRECTION_CAMERA_ORIGIN ); }
00106
00108
00112 virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
00113 vtkGetObjectMacro(Camera,vtkCamera VTK_WRAP_EXTERN);
00115
00117
00122 void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
00123 vtkProp3D VTK_WRAP_EXTERN*GetProp3D();
00125
00127
00130 vtkSetVector3Macro(Vector,double);
00131 vtkGetVectorMacro(Vector,double,3);
00133
00135
00139 vtkSetVector3Macro(Origin,double);
00140 vtkGetVectorMacro(Origin,double,3);
00142
00145 unsigned long GetMTime();
00146
00147 protected:
00148 vtkPolyDataSilhouette();
00149 ~vtkPolyDataSilhouette();
00150
00151 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00152 void ComputeProjectionVector(double vector[3], double origin[3]);
00153
00154 int Direction;
00155 vtkCamera *Camera;
00156 vtkProp3D *Prop3D;
00157 vtkTransform *Transform;
00158 double Vector[3];
00159 double Origin[3];
00160
00161 int EnableFeatureAngle;
00162 double FeatureAngle;
00163
00164 int BorderEdges;
00165 int PieceInvariant;
00166
00167 vtkPolyDataEdges* PreComp;
00168
00169 private:
00170 vtkPolyDataSilhouette(const vtkPolyDataSilhouette&);
00171 void operator=(const vtkPolyDataSilhouette&);
00172 };
00173
00174 #endif