VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkProjectedTexture.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00031 #ifndef __vtkProjectedTexture_h 00032 #define __vtkProjectedTexture_h 00033 00034 #include "vtkFiltersModelingModule.h" // For export macro 00035 #include "vtkDataSetAlgorithm.h" 00036 00037 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0 00038 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1 00039 00040 class VTKFILTERSMODELING_EXPORT vtkProjectedTexture : public vtkDataSetAlgorithm 00041 { 00042 public: 00043 static vtkProjectedTexture *New(); 00044 vtkTypeMacro(vtkProjectedTexture,vtkDataSetAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 vtkSetVector3Macro(Position,double); 00050 vtkGetVectorMacro(Position,double,3); 00052 00054 00056 void SetFocalPoint(double focalPoint[3]); 00057 void SetFocalPoint(double x, double y, double z); 00058 vtkGetVectorMacro(FocalPoint,double,3); 00060 00062 00064 vtkSetMacro(CameraMode, int); 00065 vtkGetMacro(CameraMode, int); 00066 void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);} 00067 void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);} 00069 00071 00072 vtkSetMacro(MirrorSeparation, double); 00073 vtkGetMacro(MirrorSeparation, double); 00075 00077 00078 vtkGetVectorMacro(Orientation,double,3); 00080 00082 00083 vtkSetVector3Macro(Up,double); 00084 vtkGetVectorMacro(Up,double,3); 00086 00088 00094 vtkSetVector3Macro(AspectRatio,double); 00095 vtkGetVectorMacro(AspectRatio,double,3); 00097 00099 00100 vtkSetVector2Macro(SRange,double); 00101 vtkGetVectorMacro(SRange,double,2); 00103 00105 00106 vtkSetVector2Macro(TRange,double); 00107 vtkGetVectorMacro(TRange,double,2); 00109 00110 protected: 00111 vtkProjectedTexture(); 00112 ~vtkProjectedTexture() {} 00113 00114 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00115 void ComputeNormal(); 00116 00117 int CameraMode; 00118 00119 double Position[3]; 00120 double Orientation[3]; 00121 double FocalPoint[3]; 00122 double Up[3]; 00123 double MirrorSeparation; 00124 double AspectRatio[3]; 00125 double SRange[2]; 00126 double TRange[2]; 00127 private: 00128 vtkProjectedTexture(const vtkProjectedTexture&); // Not implemented. 00129 void operator=(const vtkProjectedTexture&); // Not implemented. 00130 }; 00131 00132 #endif 00133