AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates > Class Template Reference

Uses the Engine to present an IUniverse game world. More...

Inheritance diagram for AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >:

Public Member Functions

virtual void Initialize ()
 Generate Terrain and Renderables from UniverseBase{TCoordinates}.Positionables and keeps everything in sync using events More...
 
virtual void HookIn ()
 Hooks the View into OmegaEngine.Engine.Views More...
 
virtual void HookOut ()
 Hooks the View out of OmegaEngine.Engine.Views More...
 
virtual void DimDown ()
 Dims in the screen down. More...
 
virtual void DimUp ()
 Dims in the screen back up. More...
 
void Dispose ()
 Removes the Universe hooks setup by Initialize and disposes all created Views, Scenes, PositionableRenderables, etc. More...
 

Protected Member Functions

 PresenterBase (Engine engine, TUniverse universe)
 Creates a new presenter. More...
 
virtual void RegisterRenderablesSync ()
 Hook to configure RenderablesSync and LightsSync. More...
 
virtual void Dispose (bool disposing)
 To be called by IDisposable.Dispose and the object destructor. More...
 

Protected Attributes

readonly ModelViewSync
< Positionable< TCoordinates >
, PositionableRenderable
RenderablesSync
 Maps between UniverseBase{TCoordinates}.Positionables and OmegaEngine.Graphics.Scene.Positionables. More...
 
readonly ModelViewSync
< Positionable< TCoordinates >
, LightSource
LightsSync
 Maps between UniverseBase{TCoordinates}.Positionables and OmegaEngine.Graphics.Scene.Lights. More...
 
readonly Engine Engine
 The Engine reference to use for rendering operations More...
 
readonly Scene Scene
 The engine scene containing the graphical representations of Positionable{TCoordinates}s More...
 

Properties

View View [get, set]
 The engine view used to display the Scene More...
 
TUniverse Universe [get]
 The game world to present. More...
 
bool Initialized [get, set]
 Was Initialize already called? More...
 
bool Disposed [get, set]
 Was this presenter already disposed? More...
 

Detailed Description

Uses the Engine to present an IUniverse game world.

Template Parameters
TUniverseThe type of IUniverse to present.
TCoordinatesData type for storing position coordinates of objects in the game world.
Type Constraints
TUniverse :UniverseBase<TCoordinates> 
TCoordinates :struct 

Constructor & Destructor Documentation

AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.PresenterBase ( Engine  engine,
TUniverse  universe 
)
inlineprotected

Creates a new presenter.

Parameters
engineThe engine to use for rendering.
universeThe game world to present.

Member Function Documentation

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.DimDown ( )
inlinevirtual

Dims in the screen down.

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.DimUp ( )
inlinevirtual

Dims in the screen back up.

void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Dispose ( )
inline

Removes the Universe hooks setup by Initialize and disposes all created Views, Scenes, PositionableRenderables, etc.

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Dispose ( bool  disposing)
inlineprotectedvirtual

To be called by IDisposable.Dispose and the object destructor.

Parameters
disposingtrue if called manually and not by the garbage collector.
virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.HookIn ( )
inlinevirtual

Hooks the View into OmegaEngine.Engine.Views

Will internally call Initialize first, if you didn't

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.HookOut ( )
inlinevirtual

Hooks the View out of OmegaEngine.Engine.Views

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Initialize ( )
inlinevirtual

Generate Terrain and Renderables from UniverseBase{TCoordinates}.Positionables and keeps everything in sync using events

Exceptions
FileNotFoundExceptionA required Asset file could not be found.
IOExceptionThere was an error reading an Asset file.
InvalidDataExceptionAn Asset file contains invalid data.

Should be called before HookIn is used

virtual void AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.RegisterRenderablesSync ( )
inlineprotectedvirtual

Hook to configure RenderablesSync and LightsSync.

Member Data Documentation

readonly Engine AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Engine
protected

The Engine reference to use for rendering operations

readonly ModelViewSync<Positionable<TCoordinates>, LightSource> AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.LightsSync
protected

Maps between UniverseBase{TCoordinates}.Positionables and OmegaEngine.Graphics.Scene.Lights.

readonly ModelViewSync<Positionable<TCoordinates>, PositionableRenderable> AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.RenderablesSync
protected

Maps between UniverseBase{TCoordinates}.Positionables and OmegaEngine.Graphics.Scene.Positionables.

readonly Scene AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Scene
protected

The engine scene containing the graphical representations of Positionable{TCoordinates}s

Property Documentation

bool AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Disposed
getset

Was this presenter already disposed?

bool AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Initialized
getset

Was Initialize already called?

TUniverse AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.Universe
get

The game world to present.

View AlphaFramework.Presentation.PresenterBase< TUniverse, TCoordinates >.View
getset

The engine view used to display the Scene


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