00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkProjectedTexture_h
00032 #define __vtkProjectedTexture_h
00033
00034 #include "vtkDataSetAlgorithm.h"
00035
00036 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0
00037 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1
00038
00039 class VTK_GRAPHICS_EXPORT vtkProjectedTexture : public vtkDataSetAlgorithm
00040 {
00041 public:
00042 static vtkProjectedTexture *New();
00043 vtkTypeMacro(vtkProjectedTexture,vtkDataSetAlgorithm);
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047
00048 vtkSetVector3Macro(Position,double);
00049 vtkGetVectorMacro(Position,double,3);
00051
00053
00055 void SetFocalPoint(double focalPoint[3]);
00056 void SetFocalPoint(double x, double y, double z);
00057 vtkGetVectorMacro(FocalPoint,double,3);
00059
00061
00063 vtkSetMacro(CameraMode, int);
00064 vtkGetMacro(CameraMode, int);
00065 void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);}
00066 void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);}
00068
00070
00071 vtkSetMacro(MirrorSeparation, double);
00072 vtkGetMacro(MirrorSeparation, double);
00074
00076
00077 vtkGetVectorMacro(Orientation,double,3);
00079
00080
00081 vtkSetVector3Macro(Up,double);
00082 vtkGetVectorMacro(Up,double,3);
00083
00084
00085
00086
00087
00088
00089 vtkSetVector3Macro(AspectRatio,double);
00090 vtkGetVectorMacro(AspectRatio,double,3);
00091
00093
00094 vtkSetVector2Macro(SRange,double);
00095 vtkGetVectorMacro(SRange,double,2);
00097
00099
00100 vtkSetVector2Macro(TRange,double);
00101 vtkGetVectorMacro(TRange,double,2);
00103
00104 protected:
00105 vtkProjectedTexture();
00106 ~vtkProjectedTexture() {};
00107
00108 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00109 void ComputeNormal();
00110
00111 int CameraMode;
00112
00113 double Position[3];
00114 double Orientation[3];
00115 double FocalPoint[3];
00116 double Up[3];
00117 double MirrorSeparation;
00118 double AspectRatio[3];
00119 double SRange[2];
00120 double TRange[2];
00121 private:
00122 vtkProjectedTexture(const vtkProjectedTexture&);
00123 void operator=(const vtkProjectedTexture&);
00124 };
00125
00126 #endif
00127