|
group2 0.1.0
CSE 125 Group 2
|
Implementation of the force / impulse / torque API. More...
#include "ecs/physics/Forces.hpp"#include "ecs/components/Orientation.hpp"#include "ecs/components/Position.hpp"#include "ecs/components/RigidBody.hpp"#include "ecs/components/Velocity.hpp"#include <glm/gtc/quaternion.hpp>#include <glm/mat3x3.hpp>Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
| namespace | physics::forces |
Functions | |
| void | physics::forces::applyImpulse (Registry ®istry, entt::entity entity, glm::vec3 impulse) noexcept |
| Apply an instantaneous impulse (units: kg·m/s) at the entity's centre-of-mass. | |
| void | physics::forces::applyForce (Registry ®istry, entt::entity entity, glm::vec3 force) noexcept |
| Apply a continuous force (units: kg·m/s²) at the entity's centre. | |
| void | physics::forces::applyImpulseAtPoint (Registry ®istry, entt::entity entity, glm::vec3 impulse, glm::vec3 worldPoint) noexcept |
| Apply an off-centre impulse. | |
| void | physics::forces::applyForceAtPoint (Registry ®istry, entt::entity entity, glm::vec3 force, glm::vec3 worldPoint) noexcept |
| Apply an off-centre continuous force. | |
| void | physics::forces::applyTorque (Registry ®istry, entt::entity entity, glm::vec3 torque) noexcept |
| Apply a torque (Phase 7). No-op for entities without a RigidBody. | |
| void | physics::forces::integrateAccumulators (Registry ®istry, float dt) noexcept |
| Drain every entity's force / impulse accumulators into its velocity (and, in Phase 7, angular velocity). | |
Implementation of the force / impulse / torque API.