vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::PhysicsBody Struct Reference

Per-tick dynamic state the solver reads and writes, by index. More...

#include <solver.h>

Public Attributes

glm::vec3 position = {0.0f, 0.0f, 0.0f}
 Body origin (entity world position)
glm::quat rotation = {1.0f, 0.0f, 0.0f, 0.0f}
 World orientation, as gathered and then as integrated.
glm::mat3 invInertiaWorld = glm::mat3(0.0f)
 R * I_local^-1 * R^T for this tick.
float invMass = 0.0f
 0 == not moved by this solve

Detailed Description

Per-tick dynamic state the solver reads and writes, by index.

Decoupled from the Scene. invMass == 0 marks a body this solve must not move (static, kinematic, asleep, or another end's): infinite mass to contacts, never pushed.

Member Data Documentation

◆ rotation

glm::quat Vkm::Engine::PhysicsBody::rotation = {1.0f, 0.0f, 0.0f, 0.0f}

World orientation, as gathered and then as integrated.

Not the local Transform's, which for a parented body is in the parent's frame; the inverse inertia and joint lever arms are built from it.


The documentation for this struct was generated from the following file: