transform handling

This commit is contained in:
2025-01-15 10:09:35 -06:00
parent aec3656b76
commit a24d4da3c2
8 changed files with 112 additions and 422 deletions

View File

@@ -10,15 +10,14 @@ typedef struct transform {
HMM_Vec3 scale;
HMM_Quat rotation;
HMM_Mat4 cache;
HMM_Mat3 cache3;
HMM_Mat3 gcache3;
HMM_Mat4 gcache;
rect rcache;
int dirty;
struct transform *parent;
JSValue jsparent;
struct transform *children;
struct transform **children;
JSValue *jschildren;
JSValue change_hook;
} transform;
transform *make_transform();
@@ -52,9 +51,7 @@ HMM_Mat4 transform2mat(transform *t);
HMM_Mat3 transform2mat3(transform *t);
HMM_Mat4 transform2mat4_global(transform *t);
HMM_Mat3 transform2mat3_global(transform *t);
rect transform2rect(transform *t);
int transform_dirty_chain(transform *t);
transform mat2transform(HMM_Mat4 m);