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

vtkProjectedTexture.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProjectedTexture.h,v $
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 =========================================================================*/
00043 #ifndef __vtkProjectedTexture_h
00044 #define __vtkProjectedTexture_h
00045 
00046 #include "vtkDataSetToDataSetFilter.h"
00047 
00048 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0
00049 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1
00050 
00051 class VTK_GRAPHICS_EXPORT vtkProjectedTexture : public vtkDataSetToDataSetFilter 
00052 {
00053 public:
00054   static vtkProjectedTexture *New();
00055   vtkTypeRevisionMacro(vtkProjectedTexture,vtkDataSetToDataSetFilter);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00060   vtkSetVector3Macro(Position,double);
00061   vtkGetVectorMacro(Position,double,3);
00063 
00065 
00067   void SetFocalPoint(double focalPoint[3]);
00068   void SetFocalPoint(double x, double y, double z);
00069   vtkGetVectorMacro(FocalPoint,double,3);
00071 
00073 
00075   vtkSetMacro(CameraMode, int);
00076   vtkGetMacro(CameraMode, int);
00077   void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);}
00078   void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);}
00080 
00082 
00083   vtkSetMacro(MirrorSeparation, double);
00084   vtkGetMacro(MirrorSeparation, double);
00086 
00088 
00089   vtkGetVectorMacro(Orientation,double,3);
00091   
00092   // Set/Get the up vector of the projector.
00093   vtkSetVector3Macro(Up,double);
00094   vtkGetVectorMacro(Up,double,3);
00095 
00096   // Set/Get the aspect ratio of a perpendicular cross-section of the
00097   // the projector's frustum.  The aspect ratio consists of three 
00098   // numbers:  (x, y, z), where x is the width of the 
00099   // frustum, y is the height, and z is the perpendicular
00100   // distance from the focus of the projector.
00101   vtkSetVector3Macro(AspectRatio,double);
00102   vtkGetVectorMacro(AspectRatio,double,3);
00103 
00105 
00106   vtkSetVector2Macro(SRange,double);
00107   vtkGetVectorMacro(SRange,double,2);
00109 
00111 
00112   vtkSetVector2Macro(TRange,double);
00113   vtkGetVectorMacro(TRange,double,2);
00115   
00116 protected:
00117   vtkProjectedTexture();
00118   ~vtkProjectedTexture() {};
00119 
00120   void Execute();
00121   void ComputeNormal();
00122 
00123   int CameraMode;
00124 
00125   double Position[3];
00126   double Orientation[3];
00127   double FocalPoint[3];
00128   double Up[3];
00129   double MirrorSeparation;
00130   double AspectRatio[3];
00131   double SRange[2];
00132   double TRange[2];
00133 private:
00134   vtkProjectedTexture(const vtkProjectedTexture&);  // Not implemented.
00135   void operator=(const vtkProjectedTexture&);  // Not implemented.
00136 };
00137 
00138 #endif
00139