00001 #ifndef GLT_PROJECT_H
00002 #define GLT_PROJECT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00039 #include <glt/config.h>
00040 #include <glt/gl.h>
00041
00047 class GltOrtho
00048 {
00049 public:
00050
00052 GltOrtho();
00054 ~GltOrtho();
00055
00057 void set();
00059 void set(int width,int height);
00060
00062 GLdouble &left();
00064 GLdouble &right();
00066 GLdouble &bottom();
00068 GLdouble &top();
00070 GLdouble &zNear();
00072 GLdouble &zFar();
00073
00075 const GLdouble &left() const;
00077 const GLdouble &right() const;
00079 const GLdouble &bottom() const;
00081 const GLdouble &top() const;
00083 const GLdouble &zNear() const;
00085 const GLdouble &zFar() const;
00086
00088 bool tile(GltOrtho &frust,const int dx,const int dy,const int n) const;
00089
00090 private:
00091
00092 GLdouble _left;
00093 GLdouble _right;
00094 GLdouble _bottom;
00095 GLdouble _top;
00096 GLdouble _zNear;
00097 GLdouble _zFar;
00098 };
00099
00105 class GltFrustum
00106 {
00107 public:
00108
00110 GltFrustum();
00112 ~GltFrustum();
00113
00115 void set();
00117 void set(int width,int height);
00118
00120 GLdouble &left();
00122 GLdouble &right();
00124 GLdouble &bottom();
00126 GLdouble &top();
00128 GLdouble &zNear();
00130 GLdouble &zFar();
00131
00133 const GLdouble &left() const;
00135 const GLdouble &right() const;
00137 const GLdouble &bottom() const;
00139 const GLdouble &top() const;
00141 const GLdouble &zNear() const;
00143 const GLdouble &zFar() const;
00144
00146 bool tile(GltFrustum &frust,const int dx,const int dy,const int n) const;
00147
00148 private:
00149
00150 GLdouble _left;
00151 GLdouble _right;
00152 GLdouble _bottom;
00153 GLdouble _top;
00154 GLdouble _zNear;
00155 GLdouble _zFar;
00156 };
00157
00158 #endif