![]() |
AireEngine
A 3D Open-World Game Engine
|
#include <rigidbody.h>

Public Member Functions | |
| Rigidbody (int rbIndex, glm::vec3 pos=glm::vec3(0, 0, 0), glm::mat3 rot=glm::mat3(1.0)) | |
| void | update (float aTerrainHeight) |
Public Attributes | |
| int | rbIndex |
| glm::vec3 | position |
| glm::mat3 | orientation |
| float | verticalSpeed |
| glm::vec3 | velocity = glm::vec3(0, 0, 0) |
| bool | hasGravity |
| float | gravityValue |
| bool | grounded = true |
| bool | collidable = true |
| bool | isStatic = false |
| bool | willCollide = false |
| bool | canFall = true |
| bool | isSphere = false |
| float | width = 0 |
| float | height = 0 |
| float | depth = 0 |
| float | radius = 0 |
A class for defining a rigid body. Maintains it's own world position / orientation
| Rigidbody::Rigidbody | ( | int | rbIndex, |
| glm::vec3 | pos = glm::vec3(0,0,0), | ||
| glm::mat3 | rot = glm::mat3(1.0) ) |
Rigidbody Constructor - No camera Creates a rigidbody at a given position.
| rbIndex | original index of the rigidbody in rigidbodies |
| pos | optional positional argument, starting point for rigid body (defaults to 0,0,0). |
| rot | optional rotational argument, starting orientation for rigid body (defaults to identity) |
Update function to update the state of the rigidbody
| aTerrainHeight | The height of the terrain at the position of the rigidbody |