MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::CameraManager Class Reference

This is the manager class for all camera functions. More...

#include <cameramanager.h>

+ Inheritance diagram for Mezzanine::Graphics::CameraManager:
+ Collaboration diagram for Mezzanine::Graphics::CameraManager:

Public Types

typedef std::vector
< CameraProxy * > 
CameraContainer
 Basic container type for CameraProxy storage by this class.
 
typedef std::map< CameraProxy
*, CameraController * > 
CameraControllerContainer
 Basic container type for CameraController storage by this class.
 
typedef
CameraControllerContainer::iterator 
CameraControllerIterator
 Iterator type for CameraController instances stored by this class.
 
typedef CameraContainer::iterator CameraIterator
 Iterator type for Camera instances stored by this class.
 
typedef
CameraControllerContainer::const_iterator 
ConstCameraControllerIterator
 Const Iterator type for CameraController instances stored by this class.
 
typedef
CameraContainer::const_iterator 
ConstCameraIterator
 Const Iterator type for Camera instances stored by this class.
 

Public Member Functions

 CameraManager ()
 Class Constructor.
 
 CameraManager (XML::Node &XMLNode)
 XML constructor. More...
 
virtual ~CameraManager ()
 Class Destructor.
 
CameraProxyCreateCamera ()
 Creates a camera. More...
 
CameraProxyCreateCamera (const String &Name)
 Creates a camera. More...
 
virtual void Deinitialize ()
 Removes this manager from any necessary configuration so it can be safely disposed of. More...
 
void DestroyAllCameraControllers ()
 Destroys all camera controllers being stored in this manager.
 
void DestroyAllCameras ()
 Destroy's all stored camera's.
 
void DestroyCameraController (CameraController *ToBeDestroyed)
 Destroys a cameracontroller. More...
 
void DestroyCameraController (CameraProxy *ControlledCam)
 Destroys a cameracontroller by camera. More...
 
CameraProxyGetCamera (const String &Name)
 Gets an already created camera by name. More...
 
CameraProxyGetCamera (const Whole &Index)
 Gets an already created camera by index. More...
 
virtual String GetImplementationTypeName () const
 This Allows any manager name to be sent to a stream. Primarily used for logging. More...
 
virtual ManagerType GetInterfaceType () const
 This returns the type of this manager. More...
 
Whole GetNumCameras ()
 Gets the number of cameras created and stored in this manager. More...
 
CameraControllerGetOrCreateCameraController (CameraProxy *Controlled)
 Gets a camera controller if it exists, otherwise creates it. More...
 
SceneManagerGetScene () const
 Gets the SceneManager this Camera Manager is working with. More...
 
virtual void Initialize ()
 Configures this manager for use prior to entering the main loop. More...
 
virtual void Pause (const UInt32 PL)
 Sets the pause state of this manager, or has no effect depending on the value passed in. More...
 
- Public Member Functions inherited from Mezzanine::WorldManager
 WorldManager ()
 Class constructor.
 
virtual ~WorldManager ()
 Class destructor.
 
virtual void _SetWorld (World *Parent)
 Sets the world this manager belongs to.

Exceptions
Ifthis manager is already initialized, this method will throw an "INVALID_STATE_EXCEPTION".
More...
 
virtual WorldGetWorld () const
 Gets the world this manager belongs to. More...
 
virtual bool IsPaused () const
 Gets whether or not this manager is currently paused. More...
 
- Public Member Functions inherited from Mezzanine::ManagerBase
 ManagerBase ()
 Class constructor.
 
virtual ~ManagerBase ()
 Class destructor.
 
virtual String GetInterfaceTypeAsString () const
 Gets a string of the interface type of this manager. More...
 
bool IsInitialized () const
 Gets whether or not this manager has been initialized. More...
 

Protected Attributes

CameraControllerContainer CameraControllers
 Container storing all of the CameraController instances created by this manager. More...
 
CameraContainer Cameras
 Container storing all of the Camera instances created by this manager. More...
 
SceneManagerSceneMan
 Used to reference the appropriate scene. More...
 
- Protected Attributes inherited from Mezzanine::WorldManager
bool OperationsPaused
 This stores whether or not processing for some or all objects in this manager has been paused. More...
 
WorldParentWorld
 A pointer to the world that created this manager. More...
 
- Protected Attributes inherited from Mezzanine::ManagerBase
bool Initialized
 Simple bool indicating whether or not this manager has been initialized. More...
 
EntresolTheEntresol
 The actual pointer to the Entresol core class. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Mezzanine::ManagerBase
static String GetTypeAsString (const ManagerType &ManagerType)
 Gets the string form of the type of manager. More...
 
static ManagerType GetTypeFromString (const String &ManagerName)
 Gets the type of manager requested from a string. More...
 

Detailed Description

This is the manager class for all camera functions.

This class contains all the functionality of the use and manipulation of the camera.
All functions that manipulate the camera will default to the default camera, so if you only use one camera you should never have to name the camera you want to use.
This class should only be created after the SceneManager has been created.

Definition at line 76 of file cameramanager.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::CameraManager::CameraManager ( XML::Node XMLNode)

XML constructor.

Parameters
XMLNodeThe node of the xml document to construct from.
Todo:
This class currently doesn't initialize anything from XML, if that changes this constructor needs to be expanded.

Definition at line 68 of file cameramanager.cpp.

Member Function Documentation

CameraProxy * Mezzanine::Graphics::CameraManager::CreateCamera ( )

Creates a camera.

Remarks
This function will autogenerate the name for the camera.
Returns
Returns a pointer to the created camera.

Definition at line 85 of file cameramanager.cpp.

CameraProxy * Mezzanine::Graphics::CameraManager::CreateCamera ( const String Name)

Creates a camera.

Parameters
NameThe name to be assigned to the created camera.
Returns
Returns a pointer to the created camera.

Definition at line 92 of file cameramanager.cpp.

void Mezzanine::Graphics::CameraManager::Deinitialize ( )
virtual

Removes this manager from any necessary configuration so it can be safely disposed of.

Implements Mezzanine::ManagerBase.

Definition at line 217 of file cameramanager.cpp.

void Mezzanine::Graphics::CameraManager::DestroyCameraController ( CameraController ToBeDestroyed)

Destroys a cameracontroller.

Parameters
ToBeDestroyedPointer to the cameracontrolled you want destroyed.

Definition at line 150 of file cameramanager.cpp.

void Mezzanine::Graphics::CameraManager::DestroyCameraController ( CameraProxy ControlledCam)

Destroys a cameracontroller by camera.

Parameters
ControlledCamThe camera who's controller will be destroyed. This doesn't do anything to the camera.

Definition at line 165 of file cameramanager.cpp.

CameraProxy * Mezzanine::Graphics::CameraManager::GetCamera ( const String Name)

Gets an already created camera by name.

Returns
Returns a pointer to the camera of the specified name.

Definition at line 102 of file cameramanager.cpp.

CameraProxy * Mezzanine::Graphics::CameraManager::GetCamera ( const Whole Index)

Gets an already created camera by index.

Returns
Returns a pointer to the camera at the specified index.

Definition at line 112 of file cameramanager.cpp.

String Mezzanine::Graphics::CameraManager::GetImplementationTypeName ( ) const
virtual

This Allows any manager name to be sent to a stream. Primarily used for logging.

Returns
This returns a String that contains the name.

Implements Mezzanine::ManagerBase.

Definition at line 240 of file cameramanager.cpp.

ManagerBase::ManagerType Mezzanine::Graphics::CameraManager::GetInterfaceType ( ) const
virtual

This returns the type of this manager.

This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.

Returns
This returns a ManagerTypeName to identify what this can be safely cast to.

Implements Mezzanine::ManagerBase.

Definition at line 237 of file cameramanager.cpp.

Whole Mezzanine::Graphics::CameraManager::GetNumCameras ( )

Gets the number of cameras created and stored in this manager.

Returns
Returns the number of cameras this manager is storing.

Definition at line 117 of file cameramanager.cpp.

CameraController * Mezzanine::Graphics::CameraManager::GetOrCreateCameraController ( CameraProxy Controlled)

Gets a camera controller if it exists, otherwise creates it.

Parameters
ControlledThe camera that will be controlled by the controller returned.
Returns
Returns a pointer to the created or retrieved camera controller for the camera.

Definition at line 137 of file cameramanager.cpp.

SceneManager * Mezzanine::Graphics::CameraManager::GetScene ( ) const

Gets the SceneManager this Camera Manager is working with.

Returns
Returns a pointer to the SceneManager all cameras made with this manager belong to.

Definition at line 229 of file cameramanager.cpp.

void Mezzanine::Graphics::CameraManager::Initialize ( )
virtual

Configures this manager for use prior to entering the main loop.

Reimplemented from Mezzanine::WorldManager.

Definition at line 197 of file cameramanager.cpp.

void Mezzanine::Graphics::CameraManager::Pause ( const UInt32  PL)
virtual

Sets the pause state of this manager, or has no effect depending on the value passed in.

Parameters
PLA bitfield describing the pause level being assigned to the parent world of this manager.

Implements Mezzanine::WorldManager.

Definition at line 192 of file cameramanager.cpp.

Member Data Documentation

CameraControllerContainer Mezzanine::Graphics::CameraManager::CameraControllers
protected

Container storing all of the CameraController instances created by this manager.

Definition at line 97 of file cameramanager.h.

CameraContainer Mezzanine::Graphics::CameraManager::Cameras
protected

Container storing all of the Camera instances created by this manager.

Definition at line 94 of file cameramanager.h.

SceneManager* Mezzanine::Graphics::CameraManager::SceneMan
protected

Used to reference the appropriate scene.

Definition at line 100 of file cameramanager.h.


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