|
physics
|
RigidBody structure for organising data to model physics simulations of convex hull collisions. More...
#include "body.hpp"
Public Member Functions | |
| RigidBody () | |
| Default constructor, RigidBody needs to be init{Type} with one of the inititalization functions. More... | |
| ~RigidBody () | |
| Destructor. More... | |
| int | integrateForces (vec3 gravity, float deltaTime) |
| Method for integrating all the forces for a timestep. More... | |
| int | integrateVelocities (float deltaTime) |
| Method for integrating the velocities for a timestep. More... | |
| void | add (int bodyID) |
| Add a CollisionBody to RigidBody. More... | |
| mat4 | getModelMatrix () |
| Getter for model matrix, only the integrator can update the model matrix. More... | |
| bool | getColliding () |
| Getter for whether RigidBody is colliding or not. More... | |
Public Attributes | |
| int | id = -1 |
| float | coefficient_of_restitution |
| float | mass |
| float | one_over_mass |
| float | density = 1.0f |
| vec3 | cm_position |
| mat3 | orientation |
| vec3 | cm_velocity |
| vec3 | angular_momentum |
| vec3 | cm_force |
| vec3 | torque |
| mat3 | inverse_world_inertia_tensor |
| mat3 | inverse_body_inertia_tensor |
| vec3 | angular_velocity |
| vector< vec3 > | a_bounding_vertices |
| vector< vec3 > | a_body_bounding_vertices = {} |
| vector< unsigned int > | bodyIndexes = {} |
| int | compositeBodyIndex = -1 |
| BodyType | type |
| bool | apply_gyroscopic_term = false |
| bool | sleeping = false |
| unsigned int | colliding = 0 |
Static Public Attributes | |
| static int | Counter |
| static vector< RigidBody * > | allBodies |
RigidBody structure for organising data to model physics simulations of convex hull collisions.
| RigidBody::RigidBody | ( | ) |
Default constructor, RigidBody needs to be init{Type} with one of the inititalization functions.
| RigidBody::~RigidBody | ( | ) |
Destructor.
| void RigidBody::add | ( | int | bodyID | ) |
Add a CollisionBody to RigidBody.
| bool RigidBody::getColliding | ( | ) |
Getter for whether RigidBody is colliding or not.
| mat4 RigidBody::getModelMatrix | ( | ) |
Getter for model matrix, only the integrator can update the model matrix.
| int RigidBody::integrateForces | ( | vec3 | gravity, |
| float | deltaTime | ||
| ) |
Method for integrating all the forces for a timestep.
| int RigidBody::integrateVelocities | ( | float | deltaTime | ) |
Method for integrating the velocities for a timestep.
| vector<vec3> RigidBody::a_body_bounding_vertices = {} |
| vector<vec3> RigidBody::a_bounding_vertices |
|
static |
| vec3 RigidBody::angular_momentum |
| vec3 RigidBody::angular_velocity |
| bool RigidBody::apply_gyroscopic_term = false |
| vector<unsigned int> RigidBody::bodyIndexes = {} |
| vec3 RigidBody::cm_force |
| vec3 RigidBody::cm_position |
| vec3 RigidBody::cm_velocity |
| float RigidBody::coefficient_of_restitution |
| unsigned int RigidBody::colliding = 0 |
| int RigidBody::compositeBodyIndex = -1 |
|
static |
| float RigidBody::density = 1.0f |
| int RigidBody::id = -1 |
| mat3 RigidBody::inverse_body_inertia_tensor |
| mat3 RigidBody::inverse_world_inertia_tensor |
| float RigidBody::mass |
| float RigidBody::one_over_mass |
| mat3 RigidBody::orientation |
| bool RigidBody::sleeping = false |
| vec3 RigidBody::torque |
| BodyType RigidBody::type |
1.8.13