]> icculus.org git repositories - divverent/darkplaces.git/blob - matrix3x4.h
Matrix4x4_CreateRotate and Matrix3x4_CreateRotate now take degrees instead of radians...
[divverent/darkplaces.git] / matrix3x4.h
1
2 #ifndef MATRIX3X4_H
3 #define MATRIX3X4_H
4
5 // to get the vec3_t type
6 #include "mathlib.h"
7
8 typedef struct matrix3x4_s
9 {
10         float m[3][4];
11 }
12 matrix3x4_t;
13
14 void Matrix3x4_Copy (matrix3x4_t *out, matrix3x4_t *in);
15 void Matrix3x4_Concat (matrix3x4_t *out, const matrix3x4_t *in1, const matrix3x4_t *in2);
16 void Matrix3x4_Transpose3x3 (matrix3x4_t *out, const matrix3x4_t *in1);
17
18 void Matrix3x4_CreateIdentity (matrix3x4_t *out);
19 void Matrix3x4_CreateTranslate (matrix3x4_t *out, float x, float y, float z);
20 void Matrix3x4_CreateRotate (matrix3x4_t *out, float angle, float x, float y, float z);
21 void Matrix3x4_CreateScale (matrix3x4_t *out, float x);
22 void Matrix3x4_CreateScale3 (matrix3x4_t *out, float x, float y, float z);
23
24 void Matrix3x4_ToVectors(const matrix3x4_t *in, vec3_t vx, vec3_t vy, vec3_t vz, vec3_t t);
25 void Matrix3x4_FromVectors(matrix3x4_t *out, const vec3_t vx, const vec3_t vy, const vec3_t vz, const vec3_t t);
26
27 void Matrix3x4_Transform (const matrix3x4_t *in, const vec3_t v, vec3_t out);
28 void Matrix3x4_Untransform (const matrix3x4_t *in, const vec3_t v, vec3_t out);
29
30 void Matrix3x4_ConcatTranslate (matrix3x4_t *out, float x, float y, float z);
31 void Matrix3x4_ConcatRotate (matrix3x4_t *out, float angle, float x, float y, float z);
32 void Matrix3x4_ConcatScale (matrix3x4_t *out, float x);
33 void Matrix3x4_ConcatScale3 (matrix3x4_t *out, float x, float y, float z);
34
35 #endif