projects
/
gph-cmath
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed inverse and submatrix, now testing identical to gmath
[gph-cmath]
/
src
/
cgmvec3.inl
diff --git
a/src/cgmvec3.inl
b/src/cgmvec3.inl
index
1320c08
..
429c34e
100644
(file)
--- a/
src/cgmvec3.inl
+++ b/
src/cgmvec3.inl
@@
-151,17
+151,24
@@
static inline void cgm_vrotate_quat(cgm_vec3 *v, const cgm_quat *q)
cgm_vcons(v, vq.x, vq.y, vq.z);
}
cgm_vcons(v, vq.x, vq.y, vq.z);
}
-static inline void cgm_vrotate_axis(cgm_vec3 *v, const cgm_vec3 *axis, float angle)
+static inline void cgm_vrotate_axis(cgm_vec3 *v, int axis, float angle)
{
float m[16];
cgm_mrotation_axis(m, axis, angle);
cgm_vmul_m3v3(v, m);
}
{
float m[16];
cgm_mrotation_axis(m, axis, angle);
cgm_vmul_m3v3(v, m);
}
-static inline void cgm_vrotate_euler(cgm_vec3 *v, const cgm_vec3 *euler, enum cgm_euler_mode mode)
+static inline void cgm_vrotate(cgm_vec3 *v, float angle, float x, float y, float z)
{
float m[16];
{
float m[16];
- cgm_mrotation_euler(m, euler, mode);
+ cgm_mrotation(m, angle, x, y, z);
+ cgm_vmul_m3v3(v, m);
+}
+
+static inline void cgm_vrotate_euler(cgm_vec3 *v, float a, float b, float c, enum cgm_euler_mode mode)
+{
+ float m[16];
+ cgm_mrotation_euler(m, a, b, c, mode);
cgm_vmul_m3v3(v, m);
}
cgm_vmul_m3v3(v, m);
}