38 static inline void matrix3_copy(
struct matrix3 *dst,
const struct matrix3 *
m)
40 vec3_copy(&dst->
x, &
m->x);
41 vec3_copy(&dst->
y, &
m->y);
42 vec3_copy(&dst->
z, &
m->z);
43 vec3_copy(&dst->
t, &
m->t);
46 static inline void matrix3_identity(
struct matrix3 *dst)
52 dst->
x.
x = dst->
y.
y = dst->
z.
z = 1.0f;
62 static inline void matrix3_translate(
struct matrix3 *dst,
65 vec3_sub(&dst->
t, &
m->t, v);
69 const struct quat *q);
73 const struct vec3 *v);
78 const struct plane *p);
80 const struct vec3 *v);
82 static inline void matrix3_translate3f(
struct matrix3 *dst,
86 vec3_set(&v,
x,
y,
z);
87 matrix3_translate(dst,
m, &v);
90 static inline void matrix3_rotate_aa4f(
struct matrix3 *dst,
91 const struct matrix3 *
m,
float x,
float y,
float z,
float rot)
94 axisang_set(&aa,
x,
y,
z, rot);
98 static inline void matrix3_scale3f(
struct matrix3 *dst,
99 const struct matrix3 *m,
float x,
float y,
float z)
102 vec3_set(&v,
x,
y,
z);
struct vec3 z
Definition: matrix3.h:34
EXPORT void matrix3_mirrorv(struct matrix3 *dst, const struct matrix3 *m, const struct vec3 *v)
struct vec3 t
Definition: matrix3.h:35
struct vec3 y
Definition: matrix3.h:33
EXPORT void matrix3_from_axisang(struct matrix3 *dst, const struct axisang *aa)
float z
Definition: axisang.h:30
float z
Definition: vec3.h:36
float y
Definition: axisang.h:30
struct vec3 x
Definition: matrix3.h:32
#define EXPORT
Definition: c99defs.h:49
EXPORT void matrix3_transpose(struct matrix3 *dst, const struct matrix3 *m)
__m128 m
Definition: vec3.h:39
EXPORT void matrix3_scale(struct matrix3 *dst, const struct matrix3 *m, const struct vec3 *v)
EXPORT void matrix3_mirror(struct matrix3 *dst, const struct matrix3 *m, const struct plane *p)
float x
Definition: vec3.h:36
EXPORT void matrix3_from_quat(struct matrix3 *dst, const struct quat *q)
float y
Definition: vec3.h:36
EXPORT void matrix3_rotate(struct matrix3 *dst, const struct matrix3 *m, const struct quat *q)
EXPORT void matrix3_rotate_aa(struct matrix3 *dst, const struct matrix3 *m, const struct axisang *aa)
EXPORT void matrix3_mul(struct matrix3 *dst, const struct matrix3 *m1, const struct matrix3 *m2)
EXPORT void matrix3_inv(struct matrix3 *dst, const struct matrix3 *m)
float x
Definition: axisang.h:30
EXPORT void matrix3_from_matrix4(struct matrix3 *dst, const struct matrix4 *m)