summaryrefslogtreecommitdiff
path: root/src/extend
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-12-08 00:23:50 +0800
committerchai <chaifix@163.com>2019-12-08 00:23:50 +0800
commit3df29dc54c509c983dc8a0e23eab4160d48144f2 (patch)
treed8c5287c9979e731e373e7a1481aadd79d3f071b /src/extend
parent8e684dc0c76708e3174f005aebcaabc144b85500 (diff)
+clipping
Diffstat (limited to 'src/extend')
-rw-r--r--src/extend/transform.h17
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);