Wraith
0.1.5
Basic 3D game engine in C++
|
A game object. Base class for all user defined game objects. Contains operations such as update, draw, input, and collision to be defined by the user. Also contains function to register or deregister specific game object related operations to the current scene. More...
#include <GameObject.h>
Public Member Functions | |
GameObject () | |
Default constructor. More... | |
GameObject (const GameObject &)=default | |
GameObject & | operator= (const GameObject &)=default |
GameObject (GameObject &&)=default | |
GameObject & | operator= (GameObject &&)=default |
virtual | ~GameObject () |
Destructor. More... | |
void | submitSceneEntry () |
Submit scene entry to current scene. More... | |
void | submitSceneExit () |
Submit scene exit from current scene. More... | |
![]() | |
Updatable () | |
Default constructor. More... | |
Updatable (const Updatable &)=default | |
Updatable & | operator= (const Updatable &)=default |
Updatable (Updatable &&)=default | |
Updatable & | operator= (Updatable &&)=default |
![]() | |
Drawable (const Drawable &)=default | |
Drawable & | operator= (const Drawable &)=default |
Drawable (Drawable &&)=default | |
Drawable & | operator= (Drawable &&)=default |
![]() | |
Alarmable (const Alarmable &)=default | |
Alarmable & | operator= (const Alarmable &)=default |
Alarmable (Alarmable &&)=default | |
Alarmable & | operator= (Alarmable &&)=default |
![]() | |
Inputable (const Inputable &)=default | |
Inputable & | operator= (const Inputable &)=default |
Inputable (Inputable &&)=default | |
Inputable & | operator= (Inputable &&)=default |
![]() | |
Collidable (const Collidable &)=default | |
Collidable & | operator= (const Collidable &)=default |
Collidable (Collidable &&)=default | |
Collidable & | operator= (Collidable &&)=default |
const CollisionVolume & | getCollisionVolume () const |
Gets the current collsion volume being used. More... | |
const CollisionVolumeBSphere & | getBSphere () const |
Gets the default BSphere. More... | |
virtual void | terrainCollision () |
Terrain collision callback for this object. More... | |
Private Member Functions | |
void | connectToScene () |
Connects to the current scene. More... | |
void | disconnectFromScene () |
Disconnects from the current scene. More... | |
virtual void | sceneEntry () |
A callback function for when a game object enters the scene . More... | |
virtual void | sceneExit () |
A callback function for when a game object exits the scene More... | |
Private Attributes | |
GameObjectEntryCommand * | _pGameObjectEntryCommand |
GameObjectExitCommand * | _pGameObjectExitCommand |
RegistrationState | _currentRegistrationState |
Friends | |
class | GameObjectAttorney |
Additional Inherited Members | |
![]() | |
enum class | VolumeType { BSPHERE , AABB , OBB } |
Values that represent volume types. More... | |
enum class | VolumeHierarchyType { OCTREE } |
Values that represent volume hierarchy htypes. More... | |
![]() | |
void | submitUpdateRegistration () |
Submit update registration to current scene. More... | |
void | submitUpdateDeregistration () |
Submit update deregistration to current scene. More... | |
bool | isRegisteredForUpdate () const |
Query if this object is registered for update. More... | |
![]() | |
void | submitDrawRegistration () |
Submit draw registration to current scene. More... | |
void | submitDrawDeregistration () |
Submit draw deregistration to current scene. More... | |
void | submitDraw2DRegistration () |
Submit draw 2D registration to current scene. More... | |
void | submitDraw2DDeregistration () |
Submit draw 2D deregistration from current scene. More... | |
bool | isRegisteredForDraw () const |
Query if this object is registered for draw. More... | |
bool | isRegisteredForDraw2D () const |
Query if this object is registered for draw 2D. More... | |
![]() | |
void | submitAlarmRegistration (float timeDelay, AlarmID alarmID) |
Submit alarm registration to the current scene. More... | |
void | submitAlarmDeregistration (AlarmID alarmID) |
Submit alarm deregistration to the current scene. More... | |
bool | isRegisteredForAlarm (AlarmID alarmID) const |
Query if 'alarmID' is registered. More... | |
float | getTimeLeftForAlarm (AlarmID alarmID) const |
Gets time left for a given alarm. More... | |
![]() | |
void | submitKeyRegistration (AZUL_KEY key, InputEvent eventType) |
Submit key registration to current scene. More... | |
void | submitKeyDeregistration (AZUL_KEY key, InputEvent eventType) |
Submit key deregistration to current scene. More... | |
bool | isRegisterForKeyWithEvent (AZUL_KEY key, InputEvent eventType) |
Query if 'key' is register for key with event. More... | |
![]() | |
void | setColliderModel (Model *pColliderModel, VolumeType volumeType) |
Sets collider model and Collision Volume type. More... | |
void | setColliderModel (Model *pColliderModel, VolumeHierarchyType volumeHierarchyType, int maxDepth) |
Sets collider model and Collision Volume Hierarchy type. More... | |
void | updateCollisionData (const Matrix &world) |
Updates the collision data described by world matrix. More... | |
template<class UserClass > | |
void | setCollidableGroup () |
Sets collidable group. More... | |
void | submitCollisionRegistration () |
Submit collision registration to current scene. More... | |
void | submitCollisionDeregistration () |
Submit collision deregistration. More... | |
bool | isRegisteredForCollisions () const |
Query if this object is registered for collisions. More... | |
A game object. Base class for all user defined game objects. Contains operations such as update, draw, input, and collision to be defined by the user. Also contains function to register or deregister specific game object related operations to the current scene.
remarks>
GameObject::GameObject | ( | ) |
Default constructor.
Initializes its GameObjectEntryCommand and GameObjectExitCommand. Also sets its RegistrationState to RegistrationState::CURRENTLY_DEREGISTERED.