39 void prepare_and_finalize()
override;
41 void update_simulation(
float p_delta_time)
override;
49 void emplace_sphere_collider(
55 void emplace_capsule_collider(
64 transform context_read_transform(uint32_t p_id)
override;
66 physics_body context_read_physics_body(uint32_t p_id)
override;
68 void linear_velocity(uint64_t p_id,
69 const glm::vec3& p_linear_velocity)
override;
71 void angular_velocity(uint64_t p_id,
72 const glm::vec3& p_angular_velocity)
override;
74 void force(uint64_t p_id,
const glm::vec3& p_cumulative_force)
override;
76 void add_force_and_torque(uint64_t p_id,
77 const glm::vec3& p_force,
78 const glm::vec3& p_torque)
override;
80 void add_impulse(uint64_t p_id,
const glm::vec3& p_impulse)
override;
91 ref<JPH::TempAllocatorImpl> m_temp_allocator;
98 scope<JPH::JobSystemThreadPool> m_thread_system;
104 ref<broad_phase_layer_interface> m_broad_phase_layer_interface;
110 ref<object_vs_broadphase_layer> m_object_vs_broadphase_filter;
116 ref<object_layer_pair_filter> m_object_layer_pair_filter;
132 ref<JPH::PhysicsSystem> m_physics_system;
134 std::map<uint32_t, JPH::BodyID> m_cached_body_ids;
jolt_context is the backend implementation of physics context
Definition jolt_context.hpp:19
void emplace_box_collider(uint32_t p_entity_id, const transform *p_transform, const physics_body *p_body, const box_collider *p_collider) override
Any emplace_* specific function are specific collider implementation-specific to the backend (context...
void destroy_bodies() override
Performs any specific cleanup needed by Jolt.
jolt_context(const jolt_settings &p_settings, event::event_bus &p_bus)
construct a new physics context with jolt implemented as its backend
The context is the way to interact with specific backend context implementation such as JoltPhysics a...
Definition physics_context.hpp:20
physics body data-driven representative
Definition components.hpp:34