Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static 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
 Const Iterator type for manager factories stored by this class.
 
typedef ManagerContainer::const_iterator ConstManagerIterator
 Const Iterator type for managers stored by this class.
 
typedef ManagerVec::const_iterator ConstManagerVecIterator
 Const Iterator type for containers of pre-created managers.
 
typedef WorldContainer::const_iterator ConstWorldIterator
 Const Iterator type for Worlds stored by this class.
 
typedef std::list< EntresolManager * > ManagerContainer
 Basic container type for normal manager storage in this class.
 
typedef ManagerFactoryMap::iterator ManagerFactoryIterator
 Iterator type for manager factories stored by this class.
 
typedef std::map< String, EntresolManagerFactory * > ManagerFactoryMap
 Basic container type for factories that construct known manager types.
 
typedef std::vector< EntresolManagerFactory * > ManagerFactoryVec
 Basic container type for factories that construct known manager types.
 
typedef ManagerContainer::iterator ManagerIterator
 Iterator type for managers stored by this class.
 
typedef std::vector< EntresolManager * > ManagerVec
 Container type for passing pre-created managers into the Entresol upon creation.
 
typedef ManagerVec::iterator ManagerVecIterator
 Iterator type for containers of pre-created managers.
 
typedef std::vector< World * > WorldContainer
 Basic container type for World storage.
 
typedef WorldContainer::iterator WorldIterator
 Iterator type for Worlds stored by this class.
 

Public Member Functions

 Entresol (const String &EngineDataPath, const Resource::ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi")
 Initializer file constructor. More...
 
 Entresol (ManagerFactoryVec &CustomFactories, const String &EngineDataPath, const Resource::ArchiveType ArchType, const String &InitializerFile="Mezzanine.mxi")
 Factory and initializer file constructor. More...
 
 Entresol (const String &EngineDataPath, const String &LogFileName="Mezzanine.log")
 Descriptive constructor With Manager Pointers. More...
 
 Entresol (const String &EngineDataPath, const String &LogFileName, const ManagerVec &ManagersToBeAdded)
 Descriptive constructor. More...
 
 Entresol ()
 Default constructor. More...
 
 ~Entresol ()
 Deconstructor. More...
 
Threading::LogAggregator_GetLogAggregator ()
 This is used to asynchronously handle log messages. More...
 
Logger_GetLogStream (Threading::ThreadId ID=Threading::this_thread::get_id())
 A nearly threadsafe logging sink. 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 AddManager (EntresolManager *ManagerToAdd)
 This adds a manager, in the correct order, to the list that the Entresol calls on. More...
 
void AddWorld (World *WorldToBeAdded)
 This adds a world to the list of worlds in the entresol. More...
 
void BreakMainLoop (Boole Break=true)
 This makes the main loop end after it's current frame (or cancels a previous attempt to do so). More...
 
EntresolManagerCreateManager (const String &ManagerImplName, const NameValuePairList &Params, const Boole AddToEntresol=true)
 Creates a new manager. More...
 
EntresolManagerCreateManager (const String &ManagerImplName, const XML::Node &XMLNode, const Boole AddToEntresol=true)
 Creates a new manager. More...
 
WorldCreateWorld (const String &WorldName)
 This creates a world and adds it to the World List. More...
 
WorldCreateWorld (const String &WorldName, const std::vector< WorldManager * > &ManagerToBeAdded)
 This creates a world and adds it to the World List. More...
 
WorldCreateWorld (const String &WorldName, const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType)
 This creates a world and adds it to the World List. More...
 
WorldCreateWorld (const String &WorldName, const std::vector< WorldManager * > &ManagersToBeAdded, const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType)
 This creates a world and adds it to the World List. More...
 
void Deinitialize ()
 This deinitializeds all managers and Worlds currently in the Entresol.
 
void DestroyAllManagers ()
 Destroys all managers currently in the Entresol. More...
 
void DestroyAllWorlds ()
 This destroys all the worlds in the world list.
 
void DestroyManager (EntresolManager *ToBeDestroyed)
 Destroys a manager. More...
 
void DestroyWorld (World *WorldToBeDestroyed)
 This destroys the given world and removes it from the world list. More...
 
void DestroyWorldByName (const String &WorldName)
 This destroys the world with the given name and removes it from the world list. More...
 
void DoOneFrame ()
 Run one frame. More...
 
Whole GetFrameCount () const
 How many frames have elasped? 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...
 
EntresolManagerGetManager (const Whole RetrieveType, UInt16 WhichOne=0)
 This is will find the manager of a given type. More...
 
UInt16 GetNumWorlds ()
 This gets the number of worlds in the world list. More...
 
Threading::FrameSchedulerGetScheduler ()
 Gets the core structure responsible for scheduling work in the Entresol main loop. 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...
 
WorldGetWorld (const String &WorldName)
 This gets a world from the world list by name. More...
 
WorldGetWorld (const Whole Index)
 This gets a world from the world list by index. More...
 
void Initialize (const Boole InitWorlds)
 This initializes all managers and Worlds currently in the Entresol. More...
 
void MainLoop ()
 This Function house the main loop. More...
 
void PauseAllWorlds (Boole Pause)
 Pauses all animations, particles, and object movement throughout all worlds. More...
 
void PreMainLoopInit ()
 Initialize any default managers and any added after construction. This should be called before DoOneFrame()
 
void RemoveAllWorlds ()
 This removes all worlds from the world list.
 
void RemoveManager (EntresolManager *ManagerToRemove)
 This removes a manager by finding the matching pointer. More...
 
void RemoveManager (const Whole RemoveType, UInt16 WhichOne=0)
 This removes a manager of a specific type from the list. More...
 
WorldRemoveWorld (World *WorldToBeRemoved)
 This removes the given world from the world list. More...
 
WorldRemoveWorldByName (const String &WorldName)
 This removes the world with the given name from the world list. 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 destructor.
 

Static Public Member Functions

static void AddAllEngineDefaultManagerFactories ()
 Adds all the default manager factories provided by the engine to the Entresol.
 
static void AddManagerFactory (EntresolManagerFactory *ToBeAdded)
 Adds/registers a manager factory with this Entresol, allowing it to be constructed through this API. More...
 
static void DestroyAllManagerFactories ()
 Destroys all manager factories in this Entresol. More...
 
static void DestroyManagerFactory (EntresolManagerFactory *ToBeRemoved)
 Removes and destroys a manager factory in this Entresol. More...
 
static void DestroyManagerFactory (const String &ImplName)
 Removes and destroys a manager factory in this Entresol. More...
 
static void RemoveManagerFactory (EntresolManagerFactory *ToBeRemoved)
 Removes a manager factory from this Entresol. More...
 
static void RemoveManagerFactory (const String &ImplName)
 Removes a manager factory from this Entresol. More...
 
- Static Public Member Functions inherited from Mezzanine::Singleton< Entresol >
static EntresolGetSingletonPtr ()
 Fetches a pointer to the singleton. More...
 
static Boole SingletonValid ()
 Checks to see if the singleton pointer is valid. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mezzanine::Singleton< Entresol >
 Singleton ()
 Class constructor.
 
- Static Protected Attributes inherited from Mezzanine::Singleton< Entresol >
static EntresolSingletonPtr
 The one and only pointer to the single object. More...
 

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 324 of file entresol.h.

Constructor & Destructor Documentation

Mezzanine::Entresol::Entresol ( const String EngineDataPath,
const Resource::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 113 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( ManagerFactoryVec CustomFactories,
const String EngineDataPath,
const Resource::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 122 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( const String EngineDataPath,
const String LogFileName = "Mezzanine.log" 
)

Descriptive constructor With Manager Pointers.

Parameters
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 136 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( const String EngineDataPath,
const String LogFileName,
const ManagerVec ManagersToBeAdded 
)

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 a lot of customization. In addition to everything the other constructors this one can accept a vector of pointers to managers which will be added.

Parameters
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.
ManagersToBeAddedThis is a vector of manager pointers that will be used instead of creating new ones.

Definition at line 142 of file entresol.cpp.

Mezzanine::Entresol::Entresol ( )

Default constructor.

This simply performs the same work as the descriptive constructor with some sane defaults.

Warning
Do not make a new entresol if one already exists. This can only cause problems.
Todo:
In the Entrosol, remove all references to a plugins file

Definition at line 107 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 147 of file entresol.cpp.

Member Function Documentation

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

This is used to asynchronously handle log messages.

Returns
Returns a pointer to the aggregator responsible for synchronizing logs between threads.

Definition at line 983 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
Thisthrows a ParametersRangeException 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 974 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 686 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 967 of file entresol.cpp.

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

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

Note
This method will detect if a manager is being double inserted, and will silently fail in such a case.
Parameters
ManagerToAddThe pointer to the manager to be added.

Definition at line 778 of file entresol.cpp.

void Mezzanine::Entresol::AddManagerFactory ( EntresolManagerFactory ToBeAdded)
static

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 621 of file entresol.cpp.

void Mezzanine::Entresol::AddWorld ( World WorldToBeAdded)

This adds a world to the list of worlds in the entresol.

Parameters
WorldToAddThe pointer to the world to be added.

Definition at line 862 of file entresol.cpp.

void Mezzanine::Entresol::BreakMainLoop ( Boole  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 579 of file entresol.cpp.

EntresolManager * Mezzanine::Entresol::CreateManager ( const String ManagerImplName,
const NameValuePairList Params,
const Boole  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 708 of file entresol.cpp.

EntresolManager * Mezzanine::Entresol::CreateManager ( const String ManagerImplName,
const XML::Node XMLNode,
const Boole  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 720 of file entresol.cpp.

World * Mezzanine::Entresol::CreateWorld ( const String WorldName)

This creates a world and adds it to the World List.

Parameters
WorldNameString name of the world.
Returns
Returns a pointer to the created world.

Definition at line 833 of file entresol.cpp.

World * Mezzanine::Entresol::CreateWorld ( const String WorldName,
const std::vector< WorldManager * > &  ManagerToBeAdded 
)

This creates a world and adds it to the World List.

Parameters
WorldNameString name of the world.
ManagersA container of pre-made managers to be used by this world.
Returns
Returns a pointer to the created world.

Definition at line 840 of file entresol.cpp.

World * Mezzanine::Entresol::CreateWorld ( const String WorldName,
const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType 
)

This creates a world and adds it to the World List.

Parameters
WorldNameString name of the world.
PhysicsInfoA ManagerConstructionInfo struct with data on how to configure the physics for this world.
SceneTypeA string containing the name of the underlying scene type for this world.
Returns
Returns a pointer to the created world.

Definition at line 847 of file entresol.cpp.

World * Mezzanine::Entresol::CreateWorld ( const String WorldName,
const std::vector< WorldManager * > &  ManagersToBeAdded,
const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType 
)

This creates a world and adds it to the World List.

Parameters
WorldNameString name of the world.
ManagersToBeAddedA container of pre-made managers to be used by this world.
PhysicsInfoA ManagerConstructionInfo struct with data on how to configure the physics for this world.
SceneTypeA string containing the name of the underlying scene type for this world.
Returns
Returns a pointer to the created world.

Definition at line 854 of file entresol.cpp.

void Mezzanine::Entresol::DestroyAllManagerFactories ( )
static

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 652 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 742 of file entresol.cpp.

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

Destroys a manager.

Parameters
ToBeDestroyedThe manager to be destroyed.

Definition at line 732 of file entresol.cpp.

void Mezzanine::Entresol::DestroyManagerFactory ( EntresolManagerFactory ToBeRemoved)
static

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 638 of file entresol.cpp.

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

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 643 of file entresol.cpp.

void Mezzanine::Entresol::DestroyWorld ( World WorldToBeDestroyed)

This destroys the given world and removes it from the world list.

Parameters
WorldToBeDestroyedThe name of the world to be destroyed.

Definition at line 920 of file entresol.cpp.

void Mezzanine::Entresol::DestroyWorldByName ( const String WorldName)

This destroys the world with the given name and removes it from the world list.

Parameters
WorldNameThe name of the world to be destroyed.

Definition at line 933 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 560 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 590 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 615 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 612 of file entresol.cpp.

EntresolManager * Mezzanine::Entresol::GetManager ( const Whole  RetrieveType,
UInt16  WhichOne = 0 
)

This is will find the manager of a given type.

Parameters
RetrieveTypeThe type ID of the manager to get. Use ManagerBase::ManagerType enum values for this.
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 792 of file entresol.cpp.

UInt16 Mezzanine::Entresol::GetNumWorlds ( )

This gets the number of worlds in the world list.

Returns
Returns the number of worlds in the world list.

Definition at line 884 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 495 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 609 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 606 of file entresol.cpp.

World * Mezzanine::Entresol::GetWorld ( const String WorldName)

This gets a world from the world list by name.

Parameters
WorldNameThe string name of the world to retrieve.
Returns
Returns a pointer to the world with the given name, otherwise returns NULL.

Definition at line 867 of file entresol.cpp.

World * Mezzanine::Entresol::GetWorld ( const Whole  Index)

This gets a world from the world list by index.

Parameters
WorldIndexThe index of the world to retrieve.
Returns
Returns a pointer to the world at the specified index.

Definition at line 879 of file entresol.cpp.

void Mezzanine::Entresol::Initialize ( const Boole  InitWorlds)

This initializes all managers and Worlds currently in the Entresol.

Remarks
Worlds must be initialized prior to use. Passing in "false" should only be done in Tools, Tests, or if additional configuration needs to be done in between Entresol managers and Worlds being initialized.
Parameters
InitWorldsWhether or not to initialize every World stored in this manager. If false, then only Entresol managers will be initialized.

Definition at line 501 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 550 of file entresol.cpp.

void Mezzanine::Entresol::PauseAllWorlds ( Boole  Pause)

Pauses all animations, particles, and object movement throughout all worlds.

Parameters
PausePauses the world if true, unpauses if false.

Definition at line 956 of file entresol.cpp.

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

This removes a manager by finding the matching pointer.

Parameters
ManagerToRemoveA pointer to the manager to be removed.

Definition at line 804 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManager ( const Whole  RemoveType,
UInt16  WhichOne = 0 
)

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

Parameters
RemoveTypeThe type ID of the manager to remove. Use ManagerBase::ManagerType enum values for this.
WhichOneIf not removing the first/only manager of the given type, which one by count are you erasing.

Definition at line 815 of file entresol.cpp.

void Mezzanine::Entresol::RemoveManagerFactory ( EntresolManagerFactory ToBeRemoved)
static

Removes a manager factory from this Entresol.

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

Definition at line 626 of file entresol.cpp.

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

Removes a manager factory from this Entresol.

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

Definition at line 631 of file entresol.cpp.

World * Mezzanine::Entresol::RemoveWorld ( World WorldToBeRemoved)

This removes the given world from the world list.

Parameters
WorldToBeRemovedPointer to the world to be removed from the world list.
Returns
Returns a pointer to the removed world.

Definition at line 889 of file entresol.cpp.

World * Mezzanine::Entresol::RemoveWorldByName ( const String WorldName)

This removes the world with the given name from the world list.

Parameters
WorldNameThe name of the world to be removed.
Returns
Returns a pointer to the removed world.

Definition at line 902 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 597 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 603 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 600 of file entresol.cpp.


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