Base class for all GameObjects in the engine. More...
#include <GameObject.h>
Public Member Functions | |
bool | IsRegistered () const |
Checks if the GameObject is registered in the scene. | |
bool | IsPendingRegistration () const |
Checks if the GameObject is pending registration in the scene. | |
bool | IsPendingDeregistration () const |
Checks if the GameObject is pending deregistration in the scene. | |
![]() | |
const CollisionVolume & | GetCollisionVolume () |
Gets the collision volume bounding sphere. | |
const CollisionVolumeBSphere & | GetDefaultBSphere () const |
Gets the collision volume bounding sphere. | |
Protected Member Functions | |
GameObject (const GameObject &)=delete | |
GameObject & | operator= (const GameObject &)=delete |
void | SubmitEntry () |
Submits the entry command for the GameObject. | |
void | SubmitExit () |
Submits the exit command for the GameObject. | |
virtual void | CollisionTerrain () |
Sets the entry command for the GameObject. | |
![]() | |
Alarmable (const Alarmable &)=delete | |
Alarmable & | operator= (const Alarmable &)=delete |
void | SubmitAlarmRegistration (AlarmableManager::ALARM_ID id, float t) |
Submits the alarm registration for the GameObject. | |
void | SubmitAlarmDeregistration (AlarmableManager::ALARM_ID id) |
Submits the alarm deregistration for the GameObject. | |
bool | IsAlarmRegistered (AlarmableManager::ALARM_ID id) |
Checks if the given alarm is currently registered. | |
![]() | |
Collidable (const Collidable &)=delete | |
Collidable & | operator= (const Collidable &)=delete |
template<typename C> | |
void | SetCollidableGroup () |
Sets the collidable group for the object. | |
void | SubmitCollisionRegistration () |
Submits the collision registration for the GameObject. | |
void | SubmitCollisionDeregistration () |
Submits the collision deregistration for the GameObject. | |
void | SetColliderModel (Model *mod, VolumeType v) |
Sets the collider model for the GameObject. | |
void | UpdateCollisionData (const Matrix &mat) |
Updates the collision data for the GameObject. | |
void | VisualizeCollisionVolume (VolumeType t, const Vect &color) const |
Sets the color of the bounding sphere for visualization. | |
void | VisualizeDefaultBSphere (const Vect &color) const |
Sets the default bounding sphere color for the collidable object. | |
void | VisualizeGroupAABB (const Vect &color) const |
Displays the group AABB for debugging purposes. | |
![]() | |
Drawable (const Drawable &)=delete | |
Drawable & | operator= (const Drawable &)=delete |
void | SubmitDrawRegistration () |
Submits the draw registration for the GameObject. | |
void | SubmitDrawDeregistration () |
Submits the draw deregistration for the GameObject. | |
![]() | |
Inputable (const Inputable &)=delete | |
Inputable & | operator= (const Inputable &)=delete |
void | SubmitKeyRegistration (AZUL_KEY k, EventType e) |
Submits the key registration for the GameObject. | |
void | SubmitKeyDeregistration (AZUL_KEY k, EventType e) |
Submits the key deregistration for the GameObject. | |
void | SubmitMouseKeyRegistration (AZUL_MOUSE m, EventType e) |
Submits the mouse key registration for the GameObject. | |
void | SubmitMouseKeyDeregistration (AZUL_MOUSE m, EventType e) |
Submits the mouse key deregistration for the GameObject. | |
![]() | |
Updatable (const Updatable &)=delete | |
Updatable & | operator= (const Updatable &)=delete |
void | SubmitUpdateRegistration () |
Submits the update registration for the GameObject. | |
void | SubmitUpdateDeregistration () |
Submits the update deregistration for the GameObject. | |
Private Member Functions | |
void | ConnectToScene () |
Connects the GameObject to the scene. | |
virtual void | SceneEntry ()=0 |
Called when the GameObject enters the scene; used for registration management, called by system on entry and user by request. | |
void | DisconnectFromScene () |
Disconnects the GameObject from the scene. | |
virtual void | SceneExit () |
Called when the GameObject exits the scene; used for registration management, called by user. | |
Private Attributes | |
RegistrationState | currState |
The current registration state of the GameObject. | |
GameObjectEntryCommand * | ptrEntryCmd |
Pointer to the entry command for the GameObject. | |
GameObjectExitCommand * | ptrExitCmd |
Pointer to the exit command for the GameObject. | |
Friends | |
class | GameObjectAttorney |
Base class for all GameObjects in the engine.
The GameObject class serves as the base class for all GameObjects in the engine. It provides methods for scene entry, scene exit, and connection to the scene. It also manages the registration state of the GameObject.
|
inlineprotectedvirtual |
Sets the entry command for the GameObject.
cmd | Pointer to the GameObjectEntryCommand to set. |
bool GameObject::IsPendingDeregistration | ( | ) | const |
Checks if the GameObject is pending deregistration in the scene.
bool GameObject::IsPendingRegistration | ( | ) | const |
Checks if the GameObject is pending registration in the scene.
bool GameObject::IsRegistered | ( | ) | const |
Checks if the GameObject is registered in the scene.
|
privatepure virtual |
Called when the GameObject enters the scene; used for registration management, called by system on entry and user by request.
Implemented in FreeCamera.