Equalizer 1.0

wall.h

00001 
00002 /* Copyright (c) 2006-2011, 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 EQFABRIC_WALL_H
00019 #define EQFABRIC_WALL_H
00020 
00021 #include <eq/fabric/api.h>
00022 #include <eq/fabric/types.h>
00023 #include <iostream>
00024 
00025 namespace eq
00026 {
00027 namespace fabric
00028 {
00029     class Projection;
00030 
00037     class Wall
00038     {
00039     public:
00041         EQFABRIC_API Wall();
00042 
00044         EQFABRIC_API Wall( const Vector3f& bottomLeft, 
00045                            const Vector3f& bottomRight,
00046                            const Vector3f& topLeft );
00047 
00054         EQFABRIC_API void resizeHorizontal( const float ratio );
00055 
00062         EQFABRIC_API void resizeVertical( const float ratio );
00063         
00070         EQFABRIC_API void resizeLeft( const float ratio );
00071 
00078         EQFABRIC_API void resizeRight( const float ratio );
00079 
00086         EQFABRIC_API void resizeTop( const float ratio );
00087 
00094         EQFABRIC_API void resizeBottom( const float ratio );
00095 
00100         EQFABRIC_API void apply( const Viewport& viewport);
00101 
00106         EQFABRIC_API Wall& operator = ( const Projection& projection );
00107 
00109         float getWidth() const { return (bottomRight - bottomLeft).length(); }
00110 
00112         float getHeight() const { return (topLeft - bottomLeft).length(); }
00113 
00115         EQFABRIC_API bool operator == ( const Wall& rhs ) const;
00116 
00118         EQFABRIC_API bool operator != ( const Wall& rhs ) const;
00119 
00120         Vector3f bottomLeft;  
00121         Vector3f bottomRight; 
00122         Vector3f topLeft;     
00123         
00125         enum Type
00126         {
00127             TYPE_FIXED, 
00128             TYPE_HMD    
00129         };
00130         Type type; 
00131     };
00132 
00133     EQFABRIC_API std::ostream& operator << ( std::ostream&, const Wall& );
00134     EQFABRIC_API std::ostream& operator << ( std::ostream&, const Wall::Type& );
00135 }
00136 }
00137 #endif // EQFABRIC_WALL_H
00138 
Generated on Sun May 8 2011 19:11:08 for Equalizer 1.0 by  doxygen 1.7.3