00001 #ifndef _TILE_H
00002 #define _TILE_H
00003
00004 namespace FemViewer {
00005
00006 class Tile
00007 {
00008 public:
00009
00010 Tile(const int iImgWidth,
00011 const int iImgHeight,
00012 const float fAspectR);
00013
00014 Tile(const int iImgWidth,
00015 const int iImgHeight,
00016 const int iXmin,
00017 const int iYmin,
00018 const int iXmax,
00019 const int iYmax);
00020
00021
00022
00023 ~Tile();
00024
00025
00026
00027 void InitFrustrumMatrix(const float fFOV,
00028 const float fZNear,
00029 const float fZFar,
00030 float mout[]) const;
00031
00032
00033
00034
00035
00036
00037
00038 void InitOrtho2DMatrix() const;
00039
00040
00041
00042 void InitiOrtho3DMatrix(const float fFOV, const float fZNear,
00043 const float fZFar, float mout[]) const;
00044
00045
00046
00047 void InitViewport() const;
00048
00049 private:
00050
00051
00052 #ifdef FV_DEBUG
00053 void invariants() const;
00054 #endif
00055
00056 float fImageWidth;
00057 float fImageHeight;
00058 float fAspectRatio;
00059 float fXmin;
00060 float fXmax;
00061 float fYmin;
00062 float fYmax;
00063 };
00064
00065 }
00066
00067 #endif // TILE_H