wall.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQ_WALL_H
00019 #define EQ_WALL_H
00020 
00021 #include <eq/base/base.h>
00022 
00023 #include <eq/client/types.h>
00024 #include <iostream>
00025 
00026 namespace eq
00027 {
00028     class Projection;
00029     class Viewport;
00030 
00037     class Wall
00038     {
00039     public:
00040         EQ_EXPORT Wall();
00041 
00047         EQ_EXPORT void resizeHorizontal( const float ratio );
00048 
00054         EQ_EXPORT void resizeVertical( const float ratio );
00055         
00061         EQ_EXPORT void resizeLeft( const float ratio );
00062 
00068         EQ_EXPORT void resizeRight( const float ratio );
00069 
00075         EQ_EXPORT void resizeTop( const float ratio );
00076 
00082         EQ_EXPORT void resizeBottom( const float ratio );
00083 
00085         EQ_EXPORT void apply( const Viewport& viewport);
00086 
00088         EQ_EXPORT Wall& operator = ( const Projection& projection );
00089 
00091         float getWidth() const { return (bottomRight - bottomLeft).length(); }
00092 
00094         float getHeight() const { return (topLeft - bottomLeft).length(); }
00095 
00096         EQ_EXPORT bool operator == ( const Wall& rhs ) const;
00097         EQ_EXPORT bool operator != ( const Wall& rhs ) const;
00098 
00099         Vector3f bottomLeft;
00100         Vector3f bottomRight;
00101         Vector3f topLeft;
00102         
00103         enum Type
00104         {
00105             TYPE_FIXED,
00106             TYPE_HMD
00107         };
00108         Type type;
00109     };
00110 
00111     EQ_EXPORT std::ostream& operator << ( std::ostream& os, const Wall& wall );
00112 }
00113 #endif // EQ_WALL_H
00114 
Generated on Mon Aug 10 18:58:41 2009 for Equalizer 0.9 by  doxygen 1.5.8