|
group2 0.1.0
CSE 125 Group 2
|
Analytical inertia tensors for the primitive collision shapes. More...
#include <glm/mat3x3.hpp>#include <glm/vec3.hpp>Go to the source code of this file.
Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
| namespace | physics::inertia |
Functions | |
| glm::mat3 | physics::inertia::boxInvInertia (float mass, glm::vec3 halfExtents) noexcept |
| Local-space inverse inertia tensor of a solid box of mass m and full extents (= 2 * halfExtents). | |
| glm::mat3 | physics::inertia::sphereInvInertia (float mass, float radius) noexcept |
| Local-space inverse inertia tensor of a solid sphere of mass m and radius r. | |
| glm::mat3 | physics::inertia::capsuleInvInertia (float mass, float radius, float halfHeight) noexcept |
| Local-space inverse inertia tensor of a capsule (cylinder + 2 hemispherical caps) with vertical axis (+Y), cylinder half-height h and radius r, total mass m. | |
Analytical inertia tensors for the primitive collision shapes.
Returns local-space inverse inertia tensors directly because every runtime use multiplies by the inverse (I^-1 * tau). The matrices are diagonal for the primitives we ship (box, sphere, capsule, cylinder) since their principal axes are aligned with local coordinates.