AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Aire::Rigidbody Class Reference

#include <rigidbody.h>

Inheritance diagram for Aire::Rigidbody:
Inheritance graph
[legend]

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
 

Detailed Description

A class for defining a rigid body. Maintains it's own world position / orientation

Constructor & Destructor Documentation

◆ Rigidbody()

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.

Parameters
rbIndexoriginal index of the rigidbody in rigidbodies
posoptional positional argument, starting point for rigid body (defaults to 0,0,0).
rotoptional rotational argument, starting orientation for rigid body (defaults to identity)

Member Function Documentation

◆ update()

void Rigidbody::update ( float aTerrainHeight)

Update function to update the state of the rigidbody

Parameters
aTerrainHeightThe height of the terrain at the position of the rigidbody

The documentation for this class was generated from the following files: