TrackedSurfaceProjection.h

Go to the documentation of this file.
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-09-07 08:49:11 -0500 (Thu, 07 Sep 2006) $
00028  * Version:       $Revision: 19311 $
00029  * -----------------------------------------------------------------
00030  *
00031  *************** <auto-copyright.pl END do not edit this line> ***************/
00032 
00033 #ifndef _VRJ_TRACKED_WALL_PROJECTION_H_
00034 #define _VRJ_TRACKED_WALL_PROJECTION_H_
00035 
00036 #include <vrj/vrjConfig.h>
00037 #include <vrj/Display/SurfaceProjection.h>
00038 #include <vrj/Util/Debug.h>
00039 #include <gadget/Type/PositionInterface.h>
00040 
00041 
00042 namespace vrj
00043 {
00044 
00045 class Matrix;
00046 
00055 class TrackedSurfaceProjection : public SurfaceProjection
00056 {
00057 public:
00067    TrackedSurfaceProjection(const gmtl::Point3f& llCorner,
00068                             const gmtl::Point3f& lrCorner,
00069                             const gmtl::Point3f& urCorner,
00070                             const gmtl::Point3f& ulCorner,
00071                             const std::string& trackerName)
00072       : SurfaceProjection(llCorner, lrCorner, urCorner, ulCorner)
00073       , mOriginalLLCorner(llCorner)
00074       , mOriginalLRCorner(lrCorner)
00075       , mOriginalURCorner(urCorner)
00076       , mOriginalULCorner(ulCorner)
00077    {
00078       //XXX: Watch for timing problems here if trakcer is not inited first.
00079       //     It shoulbe be though from dependency checking
00080       mTracker.init(trackerName);              // Intialize the tracker
00081    }
00082 
00083    virtual ~TrackedSurfaceProjection()
00084    {
00085       /* Do nothing. */ ;
00086    }
00087 
00088    virtual void config(jccl::ConfigElementPtr element)
00089    {
00090       Projection::config(element);        // Call base class config first
00091    }
00092 
00100    virtual void calcViewMatrix(const gmtl::Matrix44f& eyePos,
00101                                const float scaleFactor);
00102 
00104    void updateSurfaceParams(const float scaleFactor);
00105 
00106    std::ostream& outStream(std::ostream& out,
00107                            const unsigned int indentLevel = 0);
00108 
00109 private:
00115    gadget::PositionInterface    mTracker;
00116 
00123    gmtl::Point3f mOriginalLLCorner;
00124    gmtl::Point3f mOriginalLRCorner;
00125    gmtl::Point3f mOriginalURCorner;
00126    gmtl::Point3f mOriginalULCorner;
00128 };
00129 
00130 }
00131 
00132 
00133 #endif

Generated on Thu Jan 4 10:56:52 2007 for VR Juggler by  doxygen 1.5.1