wall.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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