From edc50a43a0ab064472aa7fde90f14cf456d92076 Mon Sep 17 00:00:00 2001 From: tech kaczynski Date: Mon, 19 Oct 2026 01:47:08 +1000 Subject: lots of editor work. Improved editor camera controls. --- ent.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ent.h') diff --git a/ent.h b/ent.h index 48ecbec..81ac395 100644 --- a/ent.h +++ b/ent.h @@ -33,10 +33,13 @@ typedef struct { PhysicsBody *bodies; PhysicsJoint *joints; u32 body_cnt, joint_cnt; + u32 root_body; struct { PhysicsBodyRuntime *bodies; b3JointId *joints; + Matrix world; + Quaternion world_rot; } runtime; bool has, debug_draw; @@ -73,6 +76,7 @@ void entity_clean(Entity*); // clean entity data without removing Entity entity_extract_now(u64 id); // removes, returns ownership bool entity_valid(u64 id); + Entity* entity_get(u64 id); u64 entity_id_at(u32 dense_idx); u64 entity_id_from_pid(u64 pid); @@ -93,4 +97,11 @@ Quaternion entity_world_rot(u64 id); void entity_set_world_pos(Entity*, Vec3); void entity_set_world_rot(Entity*, Quaternion); +/* physics component data */ +PhysicsCmp entity_physics_copy(const PhysicsCmp*); +void entity_physics_build(u64 id); +void entity_physics_clear(PhysicsCmp*); +void entity_physics_free(PhysicsCmp*); +void entity_physics_transform_changed(u64 id); + #endif -- cgit v1.2.3