Nameless Engine
|
#include <CameraManager.h>
Public Member Functions | |
CameraManager (Renderer *pRenderer) | |
void | setActiveCamera (const sgc::GcPtr< CameraNode > &pCameraNode) |
void | clearActiveCamera () |
std::pair< std::recursive_mutex, sgc::GcPtr< CameraNode > > * | getActiveCamera () |
Private Member Functions | |
void | onCameraNodeDespawning (CameraNode *pCameraNode) |
Private Attributes | |
Renderer * | pRenderer = nullptr |
std::pair< std::recursive_mutex, sgc::GcPtr< CameraNode > > | mtxActiveCamera |
Friends | |
class | CameraNode |
Determines what camera is used to draw on the screen.
ne::CameraManager::CameraManager | ( | Renderer * | pRenderer | ) |
Creates a new manager.
pRenderer | Used renderer. |
void ne::CameraManager::clearActiveCamera | ( | ) |
Removes the currently active camera so that there will be no active camera.
std::pair< std::recursive_mutex, sgc::GcPtr< CameraNode > > * ne::CameraManager::getActiveCamera | ( | ) |
Returns the currently active camera.
nullptr
if there is no active camera, otherwise valid camera.
|
private |
Called by an active camera node when it's being despawned.
pCameraNode | Camera node that's being despawned. |
void ne::CameraManager::setActiveCamera | ( | const sgc::GcPtr< CameraNode > & | pCameraNode | ) |
Makes a camera node to be the primary camera.
pCameraNode | Spawned camera node to make active. |
|
private |
Stores active camera.
|
private |
Used renderer.