Emergency 2017 Dokumentation  v3.0.1
qsf::editor::CameraManager Class Reference

Camera manager class. More...

#include <CameraManager.h>

Public Types

enum  CameraMode {
  CAMERA_MODE_NONE, CAMERA_MODE_FREE_MOVE, CAMERA_MODE_ORBITING, CAMERA_MODE_GAME,
  CAMERA_MODE_TOP_DOWN
}
 

Public Member Functions

 CameraManager (Application &application)
 Constructor. More...
 
virtual ~CameraManager ()
 Destructor. More...
 
CameraComponentgetCameraComponent () const
 Return the used camera component instance. More...
 
void setCameraComponent (CameraComponent *cameraComponent)
 Set the used camera component instance. More...
 
bool isDefaultCameraSet () const
 Check whether or not currently the default camera is set. More...
 
void setDefaultCamera ()
 Make the default camera to the currently used camera component instance. More...
 
CameraMode getCameraMode () const
 Get the current camera mode. More...
 
void setCameraMode (CameraMode cameraMode, bool updateSettings=true)
 Set camera mode. More...
 
void setCameraMovementSpeedFactor (float speedFactor)
 Set camera movement speed factor to the current input handler. More...
 
void flyCameraToPosition (const glm::vec3 &targetPosition)
 Let the currently used camera fly to the given position. More...
 
void flyCameraToEntity (const Entity &entity)
 Let the currently used camera fly to the given entity. More...
 
void flyCameraToEntityById (uint64 entityId)
 Let the currently used camera fly to the given entity ID. More...
 
void flyCameraToEntities (const EntitySelectionManager::IdSet &entityIdSet)
 Let the currently used camera fly to the given entities. More...
 

Static Public Attributes

static const uint32 MAIN_CAMERA_INPUT_HANDLER_ID
 

Additional Inherited Members

- Protected Member Functions inherited from qsf::Manager
 Manager ()
 Default constructor. More...
 
virtual ~Manager ()
 Destructor. More...
 

Detailed Description

Camera manager class.

Todo:
  • TODO(co) Under construction, we might e.g. want to add Qt signals informing about a camera change
  • TODO(co) Review the interaction with render view (the concrete window into the world), this camera manager is just high level orchestration

Definition at line 63 of file CameraManager.h.

Member Enumeration Documentation

Enumerator
CAMERA_MODE_NONE 
CAMERA_MODE_FREE_MOVE 
CAMERA_MODE_ORBITING 
CAMERA_MODE_GAME 
CAMERA_MODE_TOP_DOWN 

Definition at line 82 of file CameraManager.h.

Constructor & Destructor Documentation

qsf::editor::CameraManager::CameraManager ( Application application)
explicit

Constructor.

Parameters
[in]applicationThe owner application, must stay valid as long as this instance exists
virtual qsf::editor::CameraManager::~CameraManager ( )
virtual

Destructor.

Member Function Documentation

void qsf::editor::CameraManager::flyCameraToEntities ( const EntitySelectionManager::IdSet entityIdSet)

Let the currently used camera fly to the given entities.

Parameters
[in]entityIdSetIDs of the entities to focus on
void qsf::editor::CameraManager::flyCameraToEntity ( const Entity entity)

Let the currently used camera fly to the given entity.

Parameters
[in]entityThe entity to fly the currently used camera to
void qsf::editor::CameraManager::flyCameraToEntityById ( uint64  entityId)

Let the currently used camera fly to the given entity ID.

Parameters
[in]entityIDThe ID of the entity to fly the currently used camera to
void qsf::editor::CameraManager::flyCameraToPosition ( const glm::vec3 &  targetPosition)

Let the currently used camera fly to the given position.

Parameters
[in]targetPositionThe world space target position to fly the currently used camera to
CameraComponent* qsf::editor::CameraManager::getCameraComponent ( ) const

Return the used camera component instance.

Returns
The used camera component instance, can be a null pointer, do no destroy the returned instance
Note
  • Ease-of-use method working on the main render view
CameraMode qsf::editor::CameraManager::getCameraMode ( ) const

Get the current camera mode.

Returns
The camera mode
bool qsf::editor::CameraManager::isDefaultCameraSet ( ) const

Check whether or not currently the default camera is set.

void qsf::editor::CameraManager::setCameraComponent ( CameraComponent cameraComponent)

Set the used camera component instance.

Parameters
[in]cameraComponentThe used camera component instance, null pointer to set no camera
Note
  • Ease-of-use method working on the main render view
void qsf::editor::CameraManager::setCameraMode ( CameraMode  cameraMode,
bool  updateSettings = true 
)

Set camera mode.

Parameters
[in]modeNew camera mode to set
[in]updateSettingsUpdate settings?
void qsf::editor::CameraManager::setCameraMovementSpeedFactor ( float  speedFactor)

Set camera movement speed factor to the current input handler.

Parameters
[in]speedfactorNew camera movement speed factor to set
void qsf::editor::CameraManager::setDefaultCamera ( )

Make the default camera to the currently used camera component instance.

Member Data Documentation

const uint32 qsf::editor::CameraManager::MAIN_CAMERA_INPUT_HANDLER_ID
static

Definition at line 79 of file CameraManager.h.


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