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

This is the main entry point for the entire library. More...

#include <entresol.h>

+ Inheritance diagram for Mezzanine::Entresol:
+ Collaboration diagram for Mezzanine::Entresol:

Public Types

typedef
ManagerFactoryMap::const_iterator 
ConstManagerFactoryIterator
 
typedef ManagerFactoryMap::iterator ManagerFactoryIterator
 
typedef std::map< String,
ManagerFactory * > 
ManagerFactoryMap
 

Public Member Functions

 Entresol (const String &EngineDataPath, const ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi")
 Initializer file constructor. More...
 
 Entresol (std::vector< ManagerFactory * > &CustomFactories, const String &EngineDataPath, const ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi")
 Factory and initializer file constructor. More...
 
 Entresol (const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType, const String &EngineDataPath, const String &LogFileName="Mezzanine.log")
 Descriptive constructor With Manager Pointers. More...
 
 Entresol (const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType, const String &EngineDataPath, const String &LogFileName, const std::vector< ManagerBase * > &ManagerToBeAdded)
 Descriptive constructor. More...
 
 Entresol ()
 Default constructor. More...
 
 ~Entresol ()
 Deconstructor. More...
 
void AddAllEngineDefaultManagerFactories ()
 Adds all the default manager factories provided by the engine to the Entresol.
 
void AddManager (ManagerBase *ManagerToAdd)
 This adds a manager, in the correct order, to the list that the Entresol calls on. More...
 
void AddManagerFactory (ManagerFactory *ToBeAdded)
 Adds/registers a manager factory with this Entresol, allowing it to be constructed through this API. More...
 
void BreakMainLoop (Boolean Break=true)
 This makes the main loop end after it's current frame (or cancels a previous attempt to do so). More...
 
ManagerBaseCreateManager (const String &ManagerImplName, NameValuePairList &Params, bool AddToEntresol=true)
 Creates a new manager. More...
 
ManagerBaseCreateManager (const String &ManagerImplName, XML::Node &XMLNode, bool AddToEntresol=true)
 Creates a new manager. More...
 
void DestroyAllManagerFactories ()
 Destroys all manager factories in this Entresol. More...
 
void DestroyAllManagers ()
 Destroys all managers currently in the Entresol. More...
 
void DestroyManager (ManagerBase *ToBeDestroyed)
 Destroys a manager. More...
 
void DestroyManagerFactory (ManagerFactory *ToBeRemoved)
 Removes and destroys a manager factory in this Entresol. More...
 
void DestroyManagerFactory (const String &ImplName)
 Removes and destroys a manager factory in this Entresol. More...
 
void DoOneFrame ()
 Run one frame. More...
 
void EngineInit (const bool &CallMainLoop=false)
 This initializes all managers and worlds currently in the Entresol. More...
 
ActorManagerGetActorManager (const UInt16 WhichOne=0)
 This gets the ActorManager from the manager list. More...
 
AreaEffectManagerGetAreaEffectManager (const UInt16 WhichOne=0)
 This gets the AreaEffectManager from the manager list. More...
 
Audio::AudioManagerGetAudioManager (const UInt16 WhichOne=0)
 This gets the AudioManager from the manager list. More...
 
Graphics::CameraManagerGetCameraManager (const UInt16 WhichOne=0)
 This gets the CameraManager from the manager list. More...
 
Physics::CollisionShapeManagerGetCollisionShapeManager (const UInt16 WhichOne=0)
 This gets the CollisionShapeManager from the manager list. More...
 
DebrisManagerGetDebrisManager (const UInt16 WhichOne=0)
 This gets the DebrisManager from the manager list. More...
 
EventManagerGetEventManager (const UInt16 WhichOne=0)
 This gets the EventManager from the manager list. More...
 
Whole GetFrameCount () const
 How many frames have elasped? More...
 
Graphics::GraphicsManagerGetGraphicsManager (const UInt16 WhichOne=0)
 This gets the GraphicsManager from the manager list. More...
 
Input::InputManagerGetInputManager (const UInt16 WhichOne=0)
 This gets the InputManager from the manager list. More...
 
Whole GetLastFrameTimeMicroseconds () const
 Gets the amount of time since the last time the last frame took to run. More...
 
Whole GetLastFrameTimeMilliseconds () const
 Gets the amount of time since the last time the last frame took to run. More...
 
Threading::LogAggregatorGetLogAggregator ()
 This is used to asynchronously handle log messages. More...
 
LoggerGetLogStream (Threading::ThreadId ID=Threading::this_thread::get_id())
 A nearly threadsafe logging sink. More...
 
ManagerBaseGetManager (const ManagerBase::ManagerType RetrieveType, UInt16 WhichOne=0)
 This is will find the manager of a given type. More...
 
Graphics::MeshManagerGetMeshManager (const UInt16 WhichOne=0)
 This gets the MeshManager from the manager list. More...
 
Physics::PhysicsManagerGetPhysicsManager (const UInt16 WhichOne=0)
 This gets the PhysicsManager from the manager list. More...
 
ResourceManagerGetResourceManager (const UInt16 WhichOne=0)
 This gets the ResourceManager from the manager list. These are responsible for reading and writing files on the disk. More...
 
Graphics::SceneManagerGetSceneManager (const UInt16 WhichOne=0)
 This gets the SceneManager from the manager list. More...
 
Threading::FrameSchedulerGetScheduler ()
 Gets the core structure responsible for scheduling work in the Entresol main loop. More...
 
Audio::SoundScapeManagerGetSoundScapeManager (const UInt16 WhichOne=0)
 This gets the SoundScapeManager from the manager list. More...
 
Whole GetTargetFrameTimeMicroseconds () const
 Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be. More...
 
Whole GetTargetFrameTimeMilliseconds () const
 Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be. More...
 
UI::UIManagerGetUIManager (const UInt16 WhichOne=0)
 This gets the UIManager from the manager list. More...
 
template<class T >
void Log (const T &Message)
 Runtime event and message logging. More...
 
void LogString (const String &message)
 Log String directly with no conversion. More...
 
void MainLoop ()
 This Function house the main loop. More...
 
void PauseWorld (bool Pause)
 Pauses all animations, particles, and object movement throughout the world. More...
 
void PreMainLoopInit ()
 Initialize any default managers and any added after construction. This should be called before DoOneFrame()
 
void RemoveManager (ManagerBase *ManagerToRemove)
 This removes a manager by finding the matching pointer. More...
 
void RemoveManager (const ManagerBase::ManagerType ManagersToRemoveType, UInt16 WhichOne=0)
 This removes a manager of a specific type from the list. More...
 
void RemoveManagerFactory (ManagerFactory *ToBeRemoved)
 Removes a manager factory from this Entresol. More...
 
void RemoveManagerFactory (const String &ImplName)
 Removes a manager factory from this Entresol. More...
 
void SetTargetFrameRate (const Whole NewFrameRate)
 This sets a new Target Frame Rate. More...
 
void SetTargetFrameTimeMicroseconds (const Whole NewTargetTime)
 This sets a new target time microseconds. More...
 
void SetTargetFrameTimeMilliseconds (const Whole NewTargetTime)
 This sets a new target time in milliseconds. More...
 
- Public Member Functions inherited from Mezzanine::Singleton< Entresol >
 Singleton ()
 Class constructor.
 
 ~Singleton ()
 Class destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from Mezzanine::Singleton< Entresol >
static EntresolGetSingletonPtr ()
 Fetches a pointer to the singleton. More...
 
static bool SingletonValid ()
 Checks to see if the singleton pointer is valid. More...
 
- Static Protected Attributes inherited from Mezzanine::Singleton< Entresol >
static EntresolSingletonPtr
 

Detailed Description

This is the main entry point for the entire library.

The entresol coordinates and integrates all the underlying subsystems, Currently Ogre3d is used for 3d Graphics, Bullet is used for physics, and SDL is used for user input and window management. Games will need a container for all the playing pieces. It makes sense to tie all of this functionality into one core object.

Definition at line 364 of file entresol.h.

Constructor & Destructor Documentation

Mezzanine::Entresol::Entresol ( const String EngineDataPath,
const ArchiveType  ArchType,
const String InitializerFile = "Mezzanine.mxi" 
)

Initializer file constructor.

This function expects an ".mxi" (Mezzanine XML Initializer) file. If the file provided is not one of this type this function will throw an exception.

When initializing factories in the XML file this constructor does not initialize any additional manager factories, so if they are called this will throw an exception.

Parameters
EngineDataPathThe directory where engine specific data resides. This is where it will search for the specified initializer file.
ArchTypeThe type of archive at the path provided.
InitializerFileThe file that describes how to initialize Mezzanine.

Definition at line 148 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( std::vector< ManagerFactory * > &  CustomFactories,
const String EngineDataPath,
const ArchiveType  ArchType,
const String InitializerFile = "Mezzanine.mxi" 
)

Factory and initializer file constructor.

This function expects an ".mxi" (Mezzanine XML Initializer) file. If the file provided is not one of this type this function will throw an exception.

Also default factories are already added and thus do not need to be included in the Factory vector.

Parameters
CustomFactoriesA vector containing the additional factories to be registered before initializing the engine.
EngineDataPathThe directory where engine specific data resides. This is where it will search for the specified initializer file.
ArchTypeThe type of archive at the path provided.
InitializerFileThe file that describes how to initialize Mezzanine.

Definition at line 156 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType,
const String EngineDataPath,
const String LogFileName = "Mezzanine.log" 
)

Descriptive constructor With Manager Pointers.

This constructor allows for an easier way to define the boundaries for items moving about inside the world.

Parameters
PhysicsInfoAll the info needed to initialize the physics subsystem.
SceneTypeA cue to the scenemanager as to how rendering should occur.
EngineDataPathThe directory where engine specific data (as opposed to game/application data) reside, and it include the plugins file and potentially other low level resources.
LogFileNameThis is the place that log messages get sent to.

Definition at line 170 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType,
const String EngineDataPath,
const String LogFileName,
const std::vector< ManagerBase * > &  ManagerToBeAdded 
)

Descriptive constructor.

This constructor allows for an easier way to define the boundaries for items moving about inside the entresol. This constructor provides no default arguments, but allows for maximum customization. In addition to everything the other constructors this one can accept a vector of pointers to managers which will be added.

Parameters
PhysicsInfoAll the info needed to initialize the physics subsystem.
PluginsFileNameThe filename of the plugins file to be loaded. This is relative to the EngineDataPath.
EngineDataPathThe directory where engine specific data (as opposed to game/application data) reside, and it include the plugins file and potentially othe low level resources.
LogFileNameThis is the place that log messages get sent to.
SceneTypeA cue to the scenemanager as to how rendering should occur.
ManagerToBeAddedThis is a vector of manager pointers that will be used instead of creating new ones.

Definition at line 183 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( )

Default constructor.

In the Entrosol, reomves all references to a plugins file

This simply performs the same work as the descriptive constructor with some sane, but small, limits. It will give you a entresol which expands for 100 units from the Origin, and only allows 10 Actors.

Warning
Do not make a new entresol if one already exists. This can only cause problems.

Definition at line 139 of file entresol.cpp.

Mezzanine::Entresol::~Entresol ( )

Deconstructor.

This Tears down all the items created by the entresol, and safely frees any graphical resources, we will also delete any Objects passed into the entresol by pointer. We will not delete any pointers we pass out (like from the Events from the Event manager).

Definition at line 519 of file entresol.cpp.

Member Function Documentation

void Mezzanine::Entresol::AddManager ( ManagerBase ManagerToAdd)

This adds a manager, in the correct order, to the list that the Entresol calls on.

Parameters
ManagerToAddThe pointer to the manager to be added.

Definition at line 844 of file entresol.cpp.

void Mezzanine::Entresol::AddManagerFactory ( ManagerFactory ToBeAdded)

Adds/registers a manager factory with this Entresol, allowing it to be constructed through this API.

Parameters
ToBeAddedThe manager factory to be added.

Definition at line 671 of file entresol.cpp.

void Mezzanine::Entresol::BreakMainLoop ( Boolean  Break = true)

This makes the main loop end after it's current frame (or cancels a previous attempt to do so).

Parameters
BreakIf true this will break the main loop after the next iteration or the end of the current one. If false the main loop will just keep running.

If called while not in the main loop, it will affect the next main loop iteration. This function is thread safe and can be called from any work unit at any time.

Definition at line 628 of file entresol.cpp.

ManagerBase * Mezzanine::Entresol::CreateManager ( const String ManagerImplName,
NameValuePairList Params,
bool  AddToEntresol = true 
)

Creates a new manager.

Parameters
ManagerImplNameThe name of the manager implementation to create.
ParamsA list of name-value pairs for the params that are to be used when creating the manager.
AddToEntresolWhether or not to add the created manager to the Entresol after creation.
Returns
Returns a pointer to the created manager.

Definition at line 771 of file entresol.cpp.

ManagerBase * Mezzanine::Entresol::CreateManager ( const String ManagerImplName,
XML::Node XMLNode,
bool  AddToEntresol = true 
)

Creates a new manager.

Parameters
ManagerImplNameThe name of the manager implementation to create.
XMLNodeAn XML node containing all construction and initialization info for the manager to be created.
AddToEntresolWhether or not to add the created manager to the Entresol after creation.
Returns
Returns a pointer to the created manager.

Definition at line 784 of file entresol.cpp.

void Mezzanine::Entresol::DestroyAllManagerFactories ( )

Destroys all manager factories in this Entresol.

Warning
The destruction of manager factories should only be done after the corresponding managers have been destroyed, otherwise this will cause an exception.

Definition at line 702 of file entresol.cpp.

void Mezzanine::Entresol::DestroyAllManagers ( )

Destroys all managers currently in the Entresol.

Warning
Do not call this in anything that is run during the main loop. If you do you will have a bad time.

Definition at line 808 of file entresol.cpp.

void Mezzanine::Entresol::DestroyManager ( ManagerBase ToBeDestroyed)

Destroys a manager.

Parameters
ToBeDestroyedThe manager to be destroyed.

Definition at line 797 of file entresol.cpp.

void Mezzanine::Entresol::DestroyManagerFactory ( ManagerFactory ToBeRemoved)

Removes and destroys a manager factory in this Entresol.

Parameters
ToBeRemovedA pointer to the manager factory that is to be removed and destroyed.

Definition at line 688 of file entresol.cpp.

void Mezzanine::Entresol::DestroyManagerFactory ( const String ImplName)

Removes and destroys a manager factory in this Entresol.

Parameters
ImplNameThe name of the manager implementation created by the factory to be removed and destroyed.

Definition at line 693 of file entresol.cpp.

void Mezzanine::Entresol::DoOneFrame ( )

Run one frame.

This should only be called after Managers and other Pre Main loop items

Definition at line 609 of file entresol.cpp.

void Mezzanine::Entresol::EngineInit ( const bool &  CallMainLoop = false)

This initializes all managers and worlds currently in the Entresol.

Parameters
CallMainLoopShould the main loop be called.

Definition at line 565 of file entresol.cpp.

ActorManager * Mezzanine::Entresol::GetActorManager ( const UInt16  WhichOne = 0)

This gets the ActorManager from the manager list.

Parameters
WhichOneIf you have multiple ActorManagers this will choose which one to return.
Returns
This returns a pointer to a ActorManager, or a NULL pointer if no matching manager exists.

Definition at line 900 of file entresol.cpp.

AreaEffectManager * Mezzanine::Entresol::GetAreaEffectManager ( const UInt16  WhichOne = 0)

This gets the AreaEffectManager from the manager list.

Parameters
WhichOneIf you have multiple AreaEffectManagers this will choose which one to return.
Returns
This returns a pointer to a AreaEffectManager, or a NULL pointer if no matching manager exists.

Definition at line 905 of file entresol.cpp.

Audio::AudioManager * Mezzanine::Entresol::GetAudioManager ( const UInt16  WhichOne = 0)

This gets the AudioManager from the manager list.

Parameters
WhichOneIf you have multiple AudioManagers this will choose which one to return.
Returns
This returns a pointer to a AudioManager, or a NULL pointer if no matching manager exists.

Definition at line 910 of file entresol.cpp.

Graphics::CameraManager * Mezzanine::Entresol::GetCameraManager ( const UInt16  WhichOne = 0)

This gets the CameraManager from the manager list.

Parameters
WhichOneIf you have multiple CameraManagers this will choose which one to return.
Returns
This returns a pointer to a CameraManager, or a NULL pointer if no matching manager exists.

Definition at line 915 of file entresol.cpp.

Physics::CollisionShapeManager * Mezzanine::Entresol::GetCollisionShapeManager ( const UInt16  WhichOne = 0)

This gets the CollisionShapeManager from the manager list.

Parameters
WhichOneIf you have multiple CollisionShapeManagers this will choose which one to return.
Returns
This returns a pointer to a CollisionShapeManager, or a NULL pointer if no matching manager exists.

Definition at line 920 of file entresol.cpp.

DebrisManager * Mezzanine::Entresol::GetDebrisManager ( const UInt16  WhichOne = 0)

This gets the DebrisManager from the manager list.

Parameters
WhichOneIf you have multiple CollisionShapeManagers this will choose which one to return.
Returns
This returns a pointer to a DebrisManager, or a NULL pointer if no matching manager exists.

Definition at line 925 of file entresol.cpp.

EventManager * Mezzanine::Entresol::GetEventManager ( const UInt16  WhichOne = 0)

This gets the EventManager from the manager list.

Parameters
WhichOneIf you have multiple EventManagers this will choose which one to return.
Returns
This returns a pointer to a EventManager, or a NULL pointer if no matching manager exists.

Definition at line 930 of file entresol.cpp.

Whole Mezzanine::Entresol::GetFrameCount ( ) const

How many frames have elasped?

Returns
A Whole containing the currect 0 based frame number.

Definition at line 640 of file entresol.cpp.

Graphics::GraphicsManager * Mezzanine::Entresol::GetGraphicsManager ( const UInt16  WhichOne = 0)

This gets the GraphicsManager from the manager list.

Parameters
WhichOneIf you have multiple GraphicsManagers this will choose which one to return.
Returns
This returns a pointer to a GraphicsManager, or a NULL pointer if no matching manager exists.

Definition at line 935 of file entresol.cpp.

Input::InputManager * Mezzanine::Entresol::GetInputManager ( const UInt16  WhichOne = 0)

This gets the InputManager from the manager list.

Parameters
WhichOneIf you have multiple InputManagers this will choose which one to return.
Returns
This returns a pointer to a InputManager, or a NULL pointer if no matching manager exists.

Definition at line 940 of file entresol.cpp.

Whole Mezzanine::Entresol::GetLastFrameTimeMicroseconds ( ) const

Gets the amount of time since the last time the last frame took to run.

This returns, in microseconds the amount of time since the frame started.

Returns
This returns a whole number which can be used to aid in the timimg of various algorithms.

Definition at line 665 of file entresol.cpp.

Whole Mezzanine::Entresol::GetLastFrameTimeMilliseconds ( ) const

Gets the amount of time since the last time the last frame took to run.

This returns, in milliseconds the amount of time since the frame started.

Returns
This returns a whole number which can be used to aid in the timimg of various algorithms.

Definition at line 662 of file entresol.cpp.

Threading::LogAggregator * Mezzanine::Entresol::GetLogAggregator ( )

This is used to asynchronously handle log messages.

Definition at line 558 of file entresol.cpp.

Logger & Mezzanine::Entresol::GetLogStream ( Threading::ThreadId  ID = Threading::this_thread::get_id())

A nearly threadsafe logging sink.

If ID is not supplied and the thread is managed by the framescheduler this should be thread safe.

Parameters
IDDefaults to the id of the current thread, but can be used to retrieve the logger for any thread.
Returns
A Logger that can be used by the thread with given ID or outside of Framescheduling in a non-threadsafe way.
Exceptions
AParametersRangeException if the thread is not managed by the frame scheduler or it Threading::FrameScheduler::CreateThreads() has not been called (It creates the ThreadSpecific resources that contain the Loggers).

Definition at line 549 of file entresol.cpp.

ManagerBase * Mezzanine::Entresol::GetManager ( const ManagerBase::ManagerType  RetrieveType,
UInt16  WhichOne = 0 
)

This is will find the manager of a given type.

Parameters
RetrieveTypeThe ManagerBase::ManagerTypeName of the manager to get.
WhichOneIf not getting the first/only manager of the given type, get one.
Returns
This returns a pointer to a ManagerBase, or a NULL pointer if no matching manager exists.

Definition at line 858 of file entresol.cpp.

Graphics::MeshManager * Mezzanine::Entresol::GetMeshManager ( const UInt16  WhichOne = 0)

This gets the MeshManager from the manager list.

Parameters
WhichOneIf you have multiple MeshManagers this will choose which one to return.
Returns
This returns a pointer to a MeshManager, or a NULL pointer if no matching manager exists.

Definition at line 945 of file entresol.cpp.

Physics::PhysicsManager * Mezzanine::Entresol::GetPhysicsManager ( const UInt16  WhichOne = 0)

This gets the PhysicsManager from the manager list.

Parameters
WhichOneIf you have multiple PhysicsManagers this will choose which one to return.
Returns
This returns a pointer to a PhysicsManager, or a NULL pointer if no matching manager exists.

Definition at line 955 of file entresol.cpp.

ResourceManager * Mezzanine::Entresol::GetResourceManager ( const UInt16  WhichOne = 0)

This gets the ResourceManager from the manager list. These are responsible for reading and writing files on the disk.

Parameters
WhichOneIf you have multiple ResourceManagers this will choose which one to return.
Returns
This returns a pointer to a ResourceManager, or a NULL pointer if no matching manager exists.

Definition at line 970 of file entresol.cpp.

Graphics::SceneManager * Mezzanine::Entresol::GetSceneManager ( const UInt16  WhichOne = 0)

This gets the SceneManager from the manager list.

Parameters
WhichOneIf you have multiple SceneManagers this will choose which one to return.
Returns
This returns a pointer to a SceneManager, or a NULL pointer if no matching manager exists.

Definition at line 960 of file entresol.cpp.

Threading::FrameScheduler & Mezzanine::Entresol::GetScheduler ( )

Gets the core structure responsible for scheduling work in the Entresol main loop.

Returns
Returns a reference to the FrameScheduler being used by this Entresol.

Definition at line 589 of file entresol.cpp.

Audio::SoundScapeManager * Mezzanine::Entresol::GetSoundScapeManager ( const UInt16  WhichOne = 0)

This gets the SoundScapeManager from the manager list.

Parameters
WhichOneIf you have multiple SoundScapeManagers this will choose which one to return.
Returns
This returns a pointer to a SoundScapeManager, or a NULL pointer if no matching manager exists.

Definition at line 965 of file entresol.cpp.

Whole Mezzanine::Entresol::GetTargetFrameTimeMicroseconds ( ) const

Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be.

In practice I've done some more testing, started out digging through the code to see if there was anything wrong, there seemed to be random extra words inside our code that the compiler didn't mind that shouldn't be there. like there was a " Schedule : " right after a line where a pointer was initialized. I only found such occurrences in gamebase.cpp though, removed them and did two tests. First test I was just randomly clicking and then I inadvertently threw the metal sphere down into the abyss, the sphere was really close to the camera when this happened, about to go over. Second time I ran the game trying to click stuff, I simply couldn't click anything. I even tried zooming in on the robots, although I can only get so close to them before I have to tamper with the camera, which I haven't done yet, but there were no results with the Robots. The third time I was successfully able to stop two spheres and move them around the platform quite smoothly. These spheres were slightly further away from the camera compared to the first run. I stopped the wooden sphere and the second metal sphere. I included a screen shot and a copy of my log for the third run. The spheres in the screenshot are both in a rest position.dware performance or timing concerns can cause this goal to be unnaitanable or trivially easy. The main loop with actually pause execution until this amount of time is reach is main loop iteration, However, the mainloop will always skip waiting if hardware is overburdened.

Returns
This returns a Whole with the current value in microseconds.

Definition at line 659 of file entresol.cpp.

Whole Mezzanine::Entresol::GetTargetFrameTimeMilliseconds ( ) const

Retrieves the amount of milliseconds we would like each iteration of the Main Loop to be.

In practice I've done some more testing, started out digging through the code to see if there was anything wrong, there seemed to be random extra words inside our code that the compiler didn't mind that shouldn't be there. like there was a " Schedule : " right after a line where a pointer was initialized. I only found such occurrences in gamebase.cpp though, removed them and did two tests. First test I was just randomly clicking and then I inadvertently threw the metal sphere down into the abyss, the sphere was really close to the camera when this happened, about to go over. Second time I ran the game trying to click stuff, I simply couldn't click anything. I even tried zooming in on the robots, although I can only get so close to them before I have to tamper with the camera, which I haven't done yet, but there were no results with the Robots. The third time I was successfully able to stop two spheres and move them around the platform quite smoothly. These spheres were slightly further away from the camera compared to the first run. I stopped the wooden sphere and the second metal sphere. I included a screen shot and a copy of my log for the third run. The spheres in the screenshot are both in a rest position.dware performance or timing concerns can cause this goal to be unnaitanable or trivially easy. The main loop with actually pause execution until this amount of time is reach is main loop iteration, However, the mainloop will always skip waiting if hardware is overburdened.

Returns
This returns a Whole with the current value in milliseconds.

Definition at line 656 of file entresol.cpp.

UI::UIManager * Mezzanine::Entresol::GetUIManager ( const UInt16  WhichOne = 0)

This gets the UIManager from the manager list.

Parameters
WhichOneIf you have multiple UIManagers this will choose which one to return.
Returns
This returns a pointer to a UIManager, or a NULL pointer if no matching manager exists.

Definition at line 975 of file entresol.cpp.

template<class T >
void Mezzanine::Entresol::Log ( const T &  Message)
inline

Runtime event and message logging.

Parameters
MessageThis is what will be streamed to the log
Exceptions
AnythingGetLogStream could throw.

Definition at line 508 of file entresol.h.

void Mezzanine::Entresol::LogString ( const String message)

Log String directly with no conversion.

Parameters
messageThe string to log
Exceptions
AnythingGetLogStream could throw.

Definition at line 542 of file entresol.cpp.

void Mezzanine::Entresol::MainLoop ( )

This Function house the main loop.

If using this you don't need to worry about initialization of managers or other pre main loop items.

Definition at line 592 of file entresol.cpp.

void Mezzanine::Entresol::PauseWorld ( bool  Pause)

Pauses all animations, particles, and object movement throughout the world.

Parameters
PausePauses the world if true, unpauses if false.

Definition at line 533 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManager ( ManagerBase ManagerToRemove)

This removes a manager by finding the matching pointer.

Parameters
ManagerToRemoveA pointer to the manager to be removed.

Definition at line 871 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManager ( const ManagerBase::ManagerType  ManagersToRemoveType,
UInt16  WhichOne = 0 
)

This removes a manager of a specific type from the list.

Parameters
ManagersToRemoveTypeThe ManagerBase::ManagerTypeName of the manager to remove.
WhichOneIf not removing the first/only manager of the given type, which one by count are you erasing.

Definition at line 883 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManagerFactory ( ManagerFactory ToBeRemoved)

Removes a manager factory from this Entresol.

Parameters
ToBeRemovedA pointer to the manager factory that is to be removed.

Definition at line 676 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManagerFactory ( const String ImplName)

Removes a manager factory from this Entresol.

Parameters
ImplNameThe name of the manager implementation created by the factory to be removed.

Definition at line 681 of file entresol.cpp.

void Mezzanine::Entresol::SetTargetFrameRate ( const Whole  NewFrameRate)

This sets a new Target Frame Rate.

This sets a new time for each frame. This divides 1000 by the NewFrameRate, drops and floating point amount and uses that amount in an call to Entresol::SetTargetFrameTime. For example a target frame rate of 40 with cause each frame to take 25 milliseconds, and a Framerate of 70 would take 14 ms

Parameters
NewFrameRateThe new desired frame rate.
Warning
Setting vary low or very High values could cause unknown errors, This is on our todo list of issues to fix.

Definition at line 647 of file entresol.cpp.

void Mezzanine::Entresol::SetTargetFrameTimeMicroseconds ( const Whole  NewTargetTime)

This sets a new target time microseconds.

This sets a new time for each frame. Each iteration of the game loop will take around this long to run, but rarely exactly this long. Setting this value Higher can results in power savings (battery life), but setting it too High can cause choppiness. Settings this value higher can result in smoother gameplay, but set it too high, and system resources could becom completely taxed and power will be wasted.

Parameters
NewTargetTimeThe new length of time, in microseconds.
Warning
Setting vary low or very High values could cause unknown errors, This is on our todo list of issues to fix.

Definition at line 653 of file entresol.cpp.

void Mezzanine::Entresol::SetTargetFrameTimeMilliseconds ( const Whole  NewTargetTime)

This sets a new target time in milliseconds.

This sets a new time for each frame. Each iteration of the game loop will take around this long to run, but rarely exactly this long. Setting this value Higher can results in power savings (battery life), but setting it too High can cause choppiness. Settings this value higher can result in smoother gameplay, but set it too high, and system resources could becom completely taxed and power will be wasted.

Parameters
NewTargetTimeThe new length of time, in milliseconds.
Warning
Setting vary low or very High values could cause unknown errors, This is on our todo list of issues to fix.

Definition at line 650 of file entresol.cpp.


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