diff options
Diffstat (limited to 'ent.h')
| -rw-r--r-- | ent.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |
