Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00046 #ifndef __vtkProjectedTexture_h
00047 #define __vtkProjectedTexture_h
00048 
00049 #include "vtkDataSetToDataSetFilter.h"
00050 
00051 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0
00052 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1
00053 
00054 class VTK_GRAPHICS_EXPORT vtkProjectedTexture : public vtkDataSetToDataSetFilter 
00055 {
00056 public:
00057   static vtkProjectedTexture *New();
00058   vtkTypeRevisionMacro(vtkProjectedTexture,vtkDataSetToDataSetFilter);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00063   vtkSetVector3Macro(Position,float);
00064   vtkGetVectorMacro(Position,float,3);
00066 
00068 
00070   void SetFocalPoint(float focalPoint[3]);
00071   void SetFocalPoint(float x, float y, float z);
00072   vtkGetVectorMacro(FocalPoint,float,3);
00074 
00076 
00078   vtkSetMacro(CameraMode, int);
00079   vtkGetMacro(CameraMode, int);
00080   void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);}
00081   void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);}
00083 
00085 
00086   vtkSetMacro(MirrorSeparation, float);
00087   vtkGetMacro(MirrorSeparation, float);
00089 
00091 
00092   vtkGetVectorMacro(Orientation,float,3);
00094   
00095   // Set/Get the up vector of the projector.
00096   vtkSetVector3Macro(Up,float);
00097   vtkGetVectorMacro(Up,float,3);
00098 
00099   // Set/Get the aspect ratio of a perpendicular cross-section of the
00100   // the projector's frustum.  The aspect ratio consists of three 
00101   // numbers:  (x, y, z), where x is the width of the 
00102   // frustum, y is the height, and z is the perpendicular
00103   // distance from the focus of the projector.
00104   vtkSetVector3Macro(AspectRatio,float);
00105   vtkGetVectorMacro(AspectRatio,float,3);
00106 
00108 
00109   vtkSetVector2Macro(SRange,float);
00110   vtkGetVectorMacro(SRange,float,2);
00112 
00114 
00115   vtkSetVector2Macro(TRange,float);
00116   vtkGetVectorMacro(TRange,float,2);
00118   
00119 protected:
00120   vtkProjectedTexture();
00121   ~vtkProjectedTexture() {};
00122 
00123   void Execute();
00124   void ComputeNormal();
00125 
00126   int CameraMode;
00127 
00128   float Position[3];
00129   float Orientation[3];
00130   float FocalPoint[3];
00131   float Up[3];
00132   float MirrorSeparation;
00133   float AspectRatio[3];
00134   float SRange[2];
00135   float TRange[2];
00136 private:
00137   vtkProjectedTexture(const vtkProjectedTexture&);  // Not implemented.
00138   void operator=(const vtkProjectedTexture&);  // Not implemented.
00139 };
00140 
00141 #endif
00142