clray

diff src/matrix.h @ 13:407935b73af3

bollocks
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 04 Aug 2010 04:51:06 +0100
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/matrix.h	Wed Aug 04 04:51:06 2010 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +#ifndef MATRIX_H_
     1.5 +#define MATRIX_H_
     1.6 +
     1.7 +class Matrix4x4 {
     1.8 +public:
     1.9 +	float m[16];
    1.10 +
    1.11 +	Matrix4x4();
    1.12 +	Matrix4x4(const float *mat);
    1.13 +	Matrix4x4(float m00, float m01, float m02, float m03,
    1.14 +			float m10, float m11, float m12, float m13,
    1.15 +			float m20, float m21, float m22, float m23,
    1.16 +			float m30, float m31, float m32, float m33);
    1.17 +	Matrix4x4(const Matrix4x4 &mat);
    1.18 +	Matrix4x4 &operator =(const Matrix4x4 &mat);
    1.19 +
    1.20 +	void identity();
    1.21 +
    1.22 +	float determinant() const;
    1.23 +	Matrix4x4 adjoint() const;
    1.24 +	void invert();
    1.25 +	void transpose();
    1.26 +
    1.27 +
    1.28 +	float *operator [](int idx);
    1.29 +	const float *operator [](int idx) const;
    1.30 +};
    1.31 +
    1.32 +
    1.33 +#endif	/* MATRIX_H_ */