file
inertia.hppComponent cubos::
Namespaces
- namespace cubos
- Cubos libraries namespace.
- namespace cubos::engine
- Engine module.
Classes
- struct cubos::engine::Inertia
- Component which defines the inertia of a body.
Functions
-
auto boxShapeInertiaTensor(float mass,
glm::vec3 dimensions) -> glm::mat3 CUBOS_
ENGINE_ API - Compute Inertia Tensor for box shape. The shape is symmetric so it guarantees a diagonal inertia tensor.
-
auto ballShapeInertiaTensor(float mass,
float radius) -> glm::mat3 CUBOS_
ENGINE_ API - Compute Inertia Tensor for ball shape. The shape is symmetric so it guarantees a diagonal inertia tensor.
-
auto cylinderShapeInertiaTensor(float mass,
float height,
float radius) -> glm::mat3 CUBOS_
ENGINE_ API - Compute Inertia Tensor for capsule shape. The shape is symmetric so it guarantees a diagonal inertia tensor.
-
auto capsuleShapeInertiaTensor(float mass,
float length,
float radius) -> glm::mat3 CUBOS_
ENGINE_ API - Compute Inertia Tensor for cylinder shape. The shape is symmetric so it guarantees a diagonal inertia tensor.
-
auto voxelShapeInertiaTensor(float mass,
const VoxelCollisionShape& shape) -> glm::mat3 CUBOS_
ENGINE_ API - Compute Inertia Tensor for a voxel shape. In case the shape is not symmetric, the inertia will not be diagonal.
-
auto shiftedInertiaTensor(const glm::mat3& matrix,
const glm::vec3& shift,
const float mass) -> glm::mat3 CUBOS_
ENGINE_ API - Computes the inertia tensor shifted by the given vector, taking into account the given mass.