Untitled Game engine no.5
1.0
|
Links all the data necessary to compute physics calculations. More...
#include <Components.hpp>
Public Member Functions | |
PhysicsEntity (Ref< Entity > &e, Ref< Transform > &transform, Ref< Collider > &collider, Ref< RigidBody > &rigidBody) | |
glm::mat4 | getMat () |
Get the matrix transformation made up of q and x. More... | |
glm::mat4 | getIMat () |
Get the inverse matrix transformation. More... | |
void | clearMat () |
Clear the matrix flags when the position or rotation is updated. | |
Public Attributes | |
Ref< Entity > | entity |
Entitiy reference. | |
Ref< Transform > | tf = nullptr |
transform reference | |
Ref< Collider > | c = nullptr |
collider reference | |
Ref< Collider > | cuse = nullptr |
Ref< RigidBody > | rb = nullptr |
rigidbody reference | |
glm::vec3 | v {0} |
glm::vec3 | w {0} |
velocity | |
glm::vec3 | x {0} |
angular momentum | |
glm::vec3 | xPrev {0} |
position | |
glm::qua< float > | q {} |
previous position (needed for XPBD) | |
glm::qua< float > | qPrev {} |
rotation quat | |
glm::qua< float > | dQ {} |
previous quat | |
bool | matUpdated = true |
storage for a delta quat More... | |
bool | itmatUpdated = true |
Links all the data necessary to compute physics calculations.
|
inline |
Get the inverse matrix transformation.
|
inline |
Get the matrix transformation made up of q and x.
bool Engine::PhysicsEntity::matUpdated = true |
storage for a delta quat
flags for storing matrix transformations (to avoid calculating them multiple times)