Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gl_matrix.h

00001 //FILE:     gl_matrix.h
00002 //AUTHOR:   Andrew Van Pernis <arakel@vr.clemson.edu>
00003 
00004 #ifndef UBER_GL_MATRIX_H
00005 #define UBER_GL_MATRIX_H 1
00006 
00007 #include <GL/gl.h>
00008 #include "matrix.h"
00009 #include "vector.h"
00010 #include "mathematics.h"
00011 
00012 namespace gl {
00013   class matrix4;
00014 }
00015 
00017 class gl::matrix4: public math::matrix4{
00018  protected:
00019   real_t m_transposed_data[4][4];
00020  public:
00022   matrix4(void){
00023   }
00024   
00026 
00039   matrix4( real_t d00, real_t d01, real_t d02, 
00040            real_t d10, real_t d11, real_t d12, 
00041            real_t d20, real_t d21, real_t d22 
00042            ):math::matrix4(d00, d01, d02,
00043                            d10, d11, d12,
00044                            d20, d21, d22){
00045   }
00046   
00048 
00061   matrix4( real_t d00, real_t d01, real_t d02, real_t d03, 
00062            real_t d10, real_t d11, real_t d12, real_t d13,
00063            real_t d20, real_t d21, real_t d22, real_t d23,
00064            real_t d30, real_t d31, real_t d32, real_t d33
00065            ):math::matrix4(d00, d01, d02, d03,
00066                            d10, d11, d12, d13,
00067                            d20, d21, d22, d23,
00068                            d30, d31, d32, d33){
00069   }
00070   
00072   virtual ~matrix4(void){
00073   }
00074   
00076 
00084   void build_frustum(const GLfloat left, const GLfloat right, const GLfloat bottom, 
00085                      const GLfloat top, const GLfloat near, const GLfloat far);
00086   
00088 
00096   void build_perspective(const GLfloat field_of_view, const GLfloat aspect_ratio, 
00097                          const GLfloat near, const GLfloat far);
00098   
00100 
00106   void build_look_at(const math::vector3 eye, const math::vector3 center, const math::vector3 up);
00107 
00109   gl::matrix4& operator= (const math::matrix4 &m);
00110 
00112 
00115   operator const GLfloat*(void);
00116 };
00117 
00118 #endif

Generated on Tue Feb 11 18:49:41 2003 for uber by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002