Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Graphics/vtkProjectedTexture.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProjectedTexture.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00047 #ifndef __vtkProjectedTexture_h
00048 #define __vtkProjectedTexture_h
00049 
00050 #include "vtkDataSetToDataSetFilter.h"
00051 
00052 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0
00053 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1
00054 
00055 class VTK_GRAPHICS_EXPORT vtkProjectedTexture : public vtkDataSetToDataSetFilter 
00056 {
00057 public:
00058   static vtkProjectedTexture *New();
00059   vtkTypeRevisionMacro(vtkProjectedTexture,vtkDataSetToDataSetFilter);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00063 
00064   vtkSetVector3Macro(Position,float);
00065   vtkGetVectorMacro(Position,float,3);
00067 
00069 
00071   void SetFocalPoint(float focalPoint[3]);
00072   void SetFocalPoint(float x, float y, float z);
00073   vtkGetVectorMacro(FocalPoint,float,3);
00075 
00077 
00079   vtkSetMacro(CameraMode, int);
00080   vtkGetMacro(CameraMode, int);
00081   void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);}
00082   void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);}
00084 
00086 
00087   vtkSetMacro(MirrorSeparation, float);
00088   vtkGetMacro(MirrorSeparation, float);
00090 
00092 
00093   vtkGetVectorMacro(Orientation,float,3);
00095   
00096   // Set/Get the up vector of the projector.
00097   vtkSetVector3Macro(Up,float);
00098   vtkGetVectorMacro(Up,float,3);
00099 
00100   // Set/Get the aspect ratio of a perpendicular cross-section of the
00101   // the projector's frustum.  The aspect ratio consists of three 
00102   // numbers:  (x, y, z), where x is the width of the 
00103   // frustum, y is the height, and z is the perpendicular
00104   // distance from the focus of the projector.
00105   vtkSetVector3Macro(AspectRatio,float);
00106   vtkGetVectorMacro(AspectRatio,float,3);
00107 
00109 
00110   vtkSetVector2Macro(SRange,float);
00111   vtkGetVectorMacro(SRange,float,2);
00113 
00115 
00116   vtkSetVector2Macro(TRange,float);
00117   vtkGetVectorMacro(TRange,float,2);
00119   
00120 protected:
00121   vtkProjectedTexture();
00122   ~vtkProjectedTexture() {};
00123 
00124   void Execute();
00125   void ComputeNormal();
00126 
00127   int CameraMode;
00128 
00129   float Position[3];
00130   float Orientation[3];
00131   float FocalPoint[3];
00132   float Up[3];
00133   float MirrorSeparation;
00134   float AspectRatio[3];
00135   float SRange[2];
00136   float TRange[2];
00137 private:
00138   vtkProjectedTexture(const vtkProjectedTexture&);  // Not implemented.
00139   void operator=(const vtkProjectedTexture&);  // Not implemented.
00140 };
00141 
00142 #endif
00143