00001 #ifndef __TRANSFO_GL__
00002 #define __TRANSFO_GL__
00003
00004 #include "ProjTransfo.h"
00005 #include "Vec4.h"
00006 #include <QGLViewer/camera.h>
00007
00008 namespace apig {
00009
00011 class TransfoGL {
00012 public:
00013 TransfoGL(bool getFromGL = true);
00014 TransfoGL(ProjTransfo modelView, ProjTransfo projection);
00015 TransfoGL(const qglviewer::Camera &camera);
00016
00017 void load() const;
00018 void save();
00019 void pushAndLoad() const;
00020 void saveAndPop();
00021 static TransfoGL* get();
00022
00023 static void push();
00024 static void pop();
00025 static void pushAndInit();
00026
00027
00028 ProjTransfo transfo() const;
00029 Vec4 viewPoint() const;
00030 float screenRatio() const;
00031
00032 public:
00033 ProjTransfo modelView, projection;
00034 };
00035
00036 }
00037
00038 #endif
00039