diff options
Diffstat (limited to 'src/extend/transform.h')
-rw-r--r-- | src/extend/transform.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/extend/transform.h b/src/extend/transform.h index b366305..16b7c7f 100644 --- a/src/extend/transform.h +++ b/src/extend/transform.h @@ -4,11 +4,24 @@ ** TransformҪעÒâ°´ scale -> rotation -> position ˳Ðò¼ÆËã */ typedef struct Transform { + /*local*/ + Vec3 localposition; + Vec3 localscale; + Quat localrotation; + /*global*/ + Transform* parent; Vec3 position; - Vec3 scale; + Vec3 scale; Quat rotation; + bool isdirty; } Transform; -void transformtranslate(Transform* trans, Vec4* v, Vec4* out); +void transform_translate(Transform* trans, Vec4* v, Vec4* out); Vec4 transform_translate(Transform* trans, Vec4* v); + +void transform_getrotation(Quat* out); /*get global rotation*/ +void transform_getposition(Vec3* out); +void transform_getscale(Vec3* out); + +void transform_setdirty(Transform* trans); |