diff options
author | chai <chaifix@163.com> | 2020-02-22 23:33:06 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-22 23:33:06 +0800 |
commit | b656c9415a8e7e3b5b7d8bf1f3c8a5444f830c79 (patch) | |
tree | f4f0578d58e5f12b00d2753efef83aaedc03137e /src/extend/transform.h | |
parent | 9c89460e136ed6c6c43704d9a3a15105e0f006b0 (diff) |
*misc
Diffstat (limited to 'src/extend/transform.h')
-rw-r--r-- | src/extend/transform.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/extend/transform.h b/src/extend/transform.h index 16b7c7f..f647819 100644 --- a/src/extend/transform.h +++ b/src/extend/transform.h @@ -1,5 +1,7 @@ #include "../math/math.h" + +typedef struct Transform Transform; /* ** TransformҪעÒâ°´ scale -> rotation -> position ˳Ðò¼ÆËã */ @@ -13,15 +15,16 @@ typedef struct Transform { Vec3 position; Vec3 scale; Quat rotation; - bool isdirty; } Transform; -void transform_translate(Transform* trans, Vec4* v, Vec4* out); - -Vec4 transform_translate(Transform* trans, Vec4* v); +void transform_translate(Transform* trans, Vec3* v); -void transform_getrotation(Quat* out); /*get global rotation*/ -void transform_getposition(Vec3* out); +void transform_getrotation(Transform* trans, Quat* out); /*get global rotation*/ +void transform_getposition(Transform* trans, Vec3* out); void transform_getscale(Vec3* out); +void transform_getpositionandrotation(Transform* trans, Vec3* pos, Quat* rot); void transform_setdirty(Transform* trans); + +/*get world to local matrix(no scale)*/ +void transform_getinvmatrixnoscale(Transform* transform, Mat4* worldToLocal); |