diff options
author | chai <chaifix@163.com> | 2020-02-26 22:52:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-26 22:52:19 +0800 |
commit | 372d77e436d21312ef1a0df622964751716963a3 (patch) | |
tree | 1a71865fea6fb9f2f532422c4b83959fff17ea76 /src/extend/transform.h | |
parent | 27687536844ed3b045bba1abd1aae8bb3692f6cb (diff) |
*misc
Diffstat (limited to 'src/extend/transform.h')
-rw-r--r-- | src/extend/transform.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/extend/transform.h b/src/extend/transform.h index cef4344..f9d650c 100644 --- a/src/extend/transform.h +++ b/src/extend/transform.h @@ -1,11 +1,11 @@ -#include "../math/math.h" +#ifndef _SOFTSHADEROOM_TRANSFORM_H_ +#define _SOFTSHADEROOM_TRANSFORM_H_ +#include "../math/math.h" typedef struct Transform Transform; -/* -** TransformҪעÒâ°´ scale -> rotation -> position ˳Ðò¼ÆËã -*/ -typedef struct Transform { + +struct Transform { /*local*/ Vec3 localposition; Vec3 localscale; @@ -15,7 +15,7 @@ typedef struct Transform { Vec3 cached_position; Vec3 cached_scale; Quat cached_rotation; -} Transform; +}; void transform_translate(Transform* trans, Vec3* v); @@ -30,3 +30,5 @@ void transform_setdirty(Transform* trans); void transform_getinvmatrixnoscale(Transform* transform, Mat4* worldToLocal); void transform_localtoworlddir(Transform* trans, Vec3* dir, Vec3* out); + +#endif
\ No newline at end of file |