Corrected a small booboo in preprocessor guard for header file in GLU and

added Matrix::identity() to Matrix
This commit is contained in:
Don BURNS 2001-12-02 08:59:39 +00:00
parent 30db615333
commit bca8b68a18
2 changed files with 10 additions and 2 deletions

View File

@ -3,7 +3,7 @@
//as published by the Free Software Foundation.
#ifndef OSG_GLU
#define OSG_GL 1
#define OSG_GLU 1
#ifdef __APPLE_CC__
#include <OpenGL/glu.h>
@ -11,4 +11,4 @@
#include <GL/glu.h>
#endif
#endif // __osgGL_h
#endif // __osgGLU_h

View File

@ -86,6 +86,7 @@ class SG_EXPORT Matrix : public Object
bool invertAffine( const Matrix& );
//basic utility functions to create new matrices or vectors
inline static Matrix identity( void );
inline static Matrix scale( const Vec3& );
inline static Matrix scale( float, float, float );
inline static Matrix trans( const Vec3& );
@ -180,6 +181,13 @@ class SG_EXPORT Matrix : public Object
};
//static utility methods
inline Matrix Matrix::identity(void)
{
Matrix m;
m.makeIdent();
return m;
}
inline Matrix Matrix::scale(float sx, float sy, float sz)
{
Matrix m;