Represents a free-moving camera in the scene. More...
#include <FreeCamera.h>
Public Member Functions | |
FreeCamera (const FreeCamera &)=delete | |
FreeCamera & | operator= (const FreeCamera &)=delete |
![]() | |
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. | |
Public Attributes | |
Camera * | freeCam |
Private Member Functions | |
void | SceneEntry () override |
Called when the GameObject enters the scene; used for registration management, called by system on entry and user by request. | |
void | KeyHeld (AZUL_KEY k) override |
Virtual method to be implemented by derived classes for key held functionality. | |
void | KeyPress (AZUL_KEY k) override |
Virtual method to be implemented by derived classes for key press functionality. | |
Private Attributes | |
Matrix | camRot |
Vect | camUp |
Vect | camLookAt |
Vect | camPos |
Vect | camDir |
float | camTranSpeed |
float | camRotSpeed |
Additional Inherited Members | |
![]() | |
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. | |
Represents a free-moving camera in the scene.
The FreeCamera class is a type of GameObject that represents a camera which can move freely in the scene. It provides methods for scene entry, scene exit, and handling key inputs to control the camera. Moves the camera based on key inputs, KEY_MINUS and KEY_EQUAL for backward and forward movement, and arrow keys for rotation.
|
overrideprivatevirtual |
Virtual method to be implemented by derived classes for key held functionality.
k | The key that is held. |
Reimplemented from Inputable.
|
overrideprivatevirtual |
Virtual method to be implemented by derived classes for key press functionality.
k | The key that is pressed. |
Reimplemented from Inputable.
|
overrideprivatevirtual |
Called when the GameObject enters the scene; used for registration management, called by system on entry and user by request.
Implements GameObject.