00001 /*************** <auto-copyright.pl BEGIN do not edit this line> ************** 00002 * 00003 * VR Juggler is (C) Copyright 1998-2005 by Iowa State University 00004 * 00005 * Original Authors: 00006 * Allen Bierbaum, Christopher Just, 00007 * Patrick Hartling, Kevin Meinert, 00008 * Carolina Cruz-Neira, Albert Baker 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this library; if not, write to the 00022 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00023 * Boston, MA 02111-1307, USA. 00024 * 00025 * ----------------------------------------------------------------- 00026 * File: $RCSfile$ 00027 * Date modified: $Date: 2006-12-18 17:22:08 -0600 (Mon, 18 Dec 2006) $ 00028 * Version: $Revision: 19701 $ 00029 * ----------------------------------------------------------------- 00030 * 00031 *************** <auto-copyright.pl END do not edit this line> ***************/ 00032 00033 #ifndef _VRJ_WALL_PROJECTION_H_ 00034 #define _VRJ_WALL_PROJECTION_H_ 00035 00036 #include <vrj/vrjConfig.h> 00037 #include <vrj/Display/Projection.h> 00038 #include <gmtl/MatrixOps.h> 00039 #include <gmtl/Point.h> 00040 00041 namespace vrj 00042 { 00043 00044 class Matrix; 00045 00053 class SurfaceProjection : public Projection 00054 { 00055 public: 00064 SurfaceProjection(const gmtl::Point3f& llCorner, 00065 const gmtl::Point3f& lrCorner, 00066 const gmtl::Point3f& urCorner, 00067 const gmtl::Point3f& ulCorner) 00068 : mLLCorner(llCorner) 00069 , mLRCorner(lrCorner) 00070 , mURCorner(urCorner) 00071 , mULCorner(ulCorner) 00072 { 00073 /* Do nothing. */ ; 00074 } 00075 00085 void validateCorners(); 00086 00088 virtual void config(jccl::ConfigElementPtr element); 00089 00098 virtual void calcViewMatrix(const gmtl::Matrix44f& eyePos, 00099 const float scaleFactor); 00100 00105 virtual void calcViewFrustum(const gmtl::Matrix44f& eyePos, 00106 const float scaleFactor); 00107 00108 std::ostream& outStream(std::ostream& out, 00109 const unsigned int indentLevel = 0); 00110 00111 protected: 00121 void calculateOffsets(); 00122 void calculateSurfaceRotation(); 00123 void calculateCornersInBaseFrame(); 00125 00145 gmtl::Matrix44f mSurfaceRotation; 00147 /* 00148 * @name Rotation of the surface 00149 * Transform from the Base to the surface. 00150 */ 00151 gmtl::Matrix44f m_base_M_surface; 00152 gmtl::Matrix44f m_surface_M_base; 00154 00157 gmtl::Point3f mLLCorner; 00158 gmtl::Point3f mLRCorner; 00159 gmtl::Point3f mURCorner; 00160 gmtl::Point3f mULCorner; 00162 00165 gmtl::Point3f mxLLCorner; 00166 gmtl::Point3f mxLRCorner; 00167 gmtl::Point3f mxURCorner; 00168 gmtl::Point3f mxULCorner; 00170 00171 float mOriginToScreen; 00172 float mOriginToRight; 00173 float mOriginToLeft; 00174 float mOriginToTop; 00175 float mOriginToBottom; 00176 }; 00177 00178 } 00179 00180 #endif
1.5.1