frustumData.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQSERVER_FRUSTUMDATA_H
00019 #define EQSERVER_FRUSTUMDATA_H
00020
00021 #include <eq/base/base.h>
00022 #include <eq/client/eye.h>
00023 #include <eq/client/wall.h>
00024 #include <vmmlib/matrix.hpp>
00025 #include <vmmlib/vector.hpp>
00026
00027 namespace eq
00028 {
00029 class Projection;
00030 class Wall;
00031
00032 namespace server
00033 {
00038 class FrustumData
00039 {
00040 public:
00041 FrustumData();
00042
00043 bool isValid() const { return (_width!=0.f && _height!=0.f); }
00044 void invalidate() { _width = 0.f; _height = 0.f; }
00045
00049 void applyProjection( const eq::Projection& projection );
00050
00052 void applyWall( const eq::Wall& wall );
00054
00058 const Matrix4f& getTransform() const { return _xfm; }
00059
00061 float getWidth() const { return _width; }
00062
00064 float getHeight() const { return _height; }
00065
00067 eq::Wall::Type getType() const { return _type; }
00069
00070 private:
00071 float _width;
00072 float _height;
00073 Matrix4f _xfm;
00074 eq::Wall::Type _type;
00075 };
00076
00077 std::ostream& operator << ( std::ostream& os, const FrustumData& );
00078 }
00079 }
00080 #endif // EQ_FRUSTUMDATA_H