Main Page | Class Hierarchy | Class List | Directories | File List

TransfoGL.h

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();  // met les matrices à l'identité
00026             // effet de bord de ces trois méthodes : le matrix-mode est GL_PROJECTION
00027             
00028             ProjTransfo transfo() const;
00029             Vec4 viewPoint() const;         // renvoie un point à l'infini si la projection est orthogonale
00030             float screenRatio() const;      // retourne le rapport hauteur/largeur de l'écran correspondant à cette transformation
00031             
00032         public:
00033             ProjTransfo modelView, projection;
00034         };
00035     
00036     }
00037 
00038 #endif
00039 

Generated on Fri Nov 14 20:49:47 2008 for Api Graphics by  doxygen 1.4.4