techkaczynski.dev / code

summaryrefslogtreecommitdiff
path: root/ent.h
diff options
context:
space:
mode:
authortech kaczynski <tk@techkaczynski.dev>2026-10-19 01:47:08 +1000
committertech kaczynski <tk@techkaczynski.dev>2026-10-19 01:47:08 +1000
commitedc50a43a0ab064472aa7fde90f14cf456d92076 (patch)
treec0281123898ddfa2d94683cbcd4cd85dd0d6ad6b /ent.h
parentcc4ba95edf2927eda63af1aeb79a503bc6fe6182 (diff)
lots of editor work. Improved editor camera controls.
Diffstat (limited to 'ent.h')
-rw-r--r--ent.h11
1 files changed, 11 insertions, 0 deletions
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