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 =========================================================================*/
00035 #ifndef __vtkProjectedTexture_h
00036 #define __vtkProjectedTexture_h
00037 
00038 #include "vtkDataSetToDataSetFilter.h"
00039 
00040 #define VTK_PROJECTED_TEXTURE_USE_PINHOLE 0
00041 #define VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS 1
00042 
00043 class VTK_GRAPHICS_EXPORT vtkProjectedTexture : public vtkDataSetToDataSetFilter 
00044 {
00045 public:
00046   static vtkProjectedTexture *New();
00047   vtkTypeRevisionMacro(vtkProjectedTexture,vtkDataSetToDataSetFilter);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00052   vtkSetVector3Macro(Position,float);
00053   vtkGetVectorMacro(Position,float,3);
00055 
00057 
00059   void SetFocalPoint(float focalPoint[3]);
00060   void SetFocalPoint(float x, float y, float z);
00061   vtkGetVectorMacro(FocalPoint,float,3);
00063 
00065 
00067   vtkSetMacro(CameraMode, int);
00068   vtkGetMacro(CameraMode, int);
00069   void SetCameraModeToPinhole() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_PINHOLE);}
00070   void SetCameraModeToTwoMirror() {this->SetCameraMode(VTK_PROJECTED_TEXTURE_USE_TWO_MIRRORS);}
00072 
00074 
00075   vtkSetMacro(MirrorSeparation, float);
00076   vtkGetMacro(MirrorSeparation, float);
00078 
00080 
00081   vtkGetVectorMacro(Orientation,float,3);
00083   
00084   // Set/Get the up vector of the projector.
00085   vtkSetVector3Macro(Up,float);
00086   vtkGetVectorMacro(Up,float,3);
00087 
00088   // Set/Get the aspect ratio of a perpendicular cross-section of the
00089   // the projector's frustum.  The aspect ratio consists of three 
00090   // numbers:  (x, y, z), where x is the width of the 
00091   // frustum, y is the height, and z is the perpendicular
00092   // distance from the focus of the projector.
00093   vtkSetVector3Macro(AspectRatio,float);
00094   vtkGetVectorMacro(AspectRatio,float,3);
00095 
00097 
00098   vtkSetVector2Macro(SRange,float);
00099   vtkGetVectorMacro(SRange,float,2);
00101 
00103 
00104   vtkSetVector2Macro(TRange,float);
00105   vtkGetVectorMacro(TRange,float,2);
00107   
00108 protected:
00109   vtkProjectedTexture();
00110   ~vtkProjectedTexture() {};
00111 
00112   void Execute();
00113   void ComputeNormal();
00114 
00115   int CameraMode;
00116 
00117   float Position[3];
00118   float Orientation[3];
00119   float FocalPoint[3];
00120   float Up[3];
00121   float MirrorSeparation;
00122   float AspectRatio[3];
00123   float SRange[2];
00124   float TRange[2];
00125 private:
00126   vtkProjectedTexture(const vtkProjectedTexture&);  // Not implemented.
00127   void operator=(const vtkProjectedTexture&);  // Not implemented.
00128 };
00129 
00130 #endif
00131