23 lines
490 B
C
23 lines
490 B
C
#ifndef MATRIX_MATH_H
|
|
#define MATRIX_MATH_H
|
|
|
|
#include <GL/gl.h>
|
|
|
|
// TODO: figure out better type definition to avoid constant casting to GLfloat*
|
|
// possibly typedef float mat4[16];
|
|
|
|
/**
|
|
* !!! ALL matrices are in column major
|
|
*/
|
|
|
|
typedef GLfloat vec4[4];
|
|
|
|
typedef GLfloat mat4[16];
|
|
|
|
extern void mat4Identity(mat4 mat);
|
|
extern void mat4Copy(mat4 src, mat4 dst);
|
|
extern void mat4Empty(mat4 mat);
|
|
extern void mat4Multiply(mat4 result, mat4 A, mat4 B);
|
|
extern void mat4Print(mat4 m);
|
|
|
|
#endif |