|
CG-Project2
|
This namespaces contains all utilities for entities affected by physic. More...
Functions | |
| void | resetGravitySolver (const unsigned int &id) |
| Resets velocity on the on y-axis, acceleration and force of the given entity. | |
| glm::vec3 | getVelocity (const unsigned int &id) |
| Retrieves the velocity of the given entity. | |
| void | updateVelocity (const unsigned int &id, const glm::vec3 velocity) |
| Updates the velocity of the given entity. | |
| void | addVelocity (const unsigned int &id, const glm::vec3 offset) |
| Adds the given offset to the velocity of the given entity. | |
| void | updateRestitutionFactor (const unsigned int &id, const float &factor) |
| Updates the restitution factor of the given entity. | |
| glm::vec3 | getAcceleration (const unsigned int &id) |
| Retrieves the acceleration of the given entity. | |
| void | updateAcceleration (const unsigned int &id, const glm::vec3 acceleration) |
| Updates the acceleration of the given entity. | |
| void | addAcceleration (const unsigned int &id, const glm::vec3 offset) |
| Adds the given offset to the acceleration of the given entity. | |
| glm::vec3 | getForce (const unsigned int &id) |
| Retrieves the force of the given entity. | |
| void | updateForce (const unsigned int &id, const glm::vec3 force) |
| Updates the force of the given entity. | |
| void | addForce (const unsigned int &id, const glm::vec3 offset) |
| Adds the given offset to the force of the given entity. | |
| float | getMass (const unsigned int &id) |
| Retrieves the mass of the given entity. | |
| void | updateMass (const unsigned int &id, const float &mass) |
| Updates the mass of the given entity. | |
This namespaces contains all utilities for entities affected by physic.
| void systems::physic::addAcceleration | ( | const unsigned int & | id, |
| const glm::vec3 | offset ) |
Adds the given offset to the acceleration of the given entity.
| id | entity id |
| offset | the offset to add |
| void systems::physic::addForce | ( | const unsigned int & | id, |
| const glm::vec3 | offset ) |
Adds the given offset to the force of the given entity.
| id | entity id |
| offset | the offset to add |
| void systems::physic::addVelocity | ( | const unsigned int & | id, |
| const glm::vec3 | offset ) |
Adds the given offset to the velocity of the given entity.
| id | entity id |
| offset | the offset to add |
| glm::vec3 systems::physic::getAcceleration | ( | const unsigned int & | id | ) |
Retrieves the acceleration of the given entity.
| id | entity id |
| glm::vec3 systems::physic::getForce | ( | const unsigned int & | id | ) |
Retrieves the force of the given entity.
| id | entity id |
| float systems::physic::getMass | ( | const unsigned int & | id | ) |
Retrieves the mass of the given entity.
| id | entity id |
| glm::vec3 systems::physic::getVelocity | ( | const unsigned int & | id | ) |
Retrieves the velocity of the given entity.
| id | entity id |
| void systems::physic::resetGravitySolver | ( | const unsigned int & | id | ) |
Resets velocity on the on y-axis, acceleration and force of the given entity.
| id | entity id |
| void systems::physic::updateAcceleration | ( | const unsigned int & | id, |
| const glm::vec3 | acceleration ) |
Updates the acceleration of the given entity.
| id | entity id |
| acceleration | entity new acceleration |
| void systems::physic::updateForce | ( | const unsigned int & | id, |
| const glm::vec3 | force ) |
Updates the force of the given entity.
| id | entity id |
| force | entity new force |
| void systems::physic::updateMass | ( | const unsigned int & | id, |
| const float & | mass ) |
Updates the mass of the given entity.
| id | entity id |
| mass | entity new mass |
| void systems::physic::updateRestitutionFactor | ( | const unsigned int & | id, |
| const float & | factor ) |
Updates the restitution factor of the given entity.
| id | entity id |
| factor | entity new restitution factor |
| void systems::physic::updateVelocity | ( | const unsigned int & | id, |
| const glm::vec3 | velocity ) |
Updates the velocity of the given entity.
| id | entity id |
| velocity | entity new velocity |