Class CoordinatePresenter<TUniverse, TCoordinates>
- Namespace
- AlphaFramework.Presentation
- Assembly
- AlphaFramework.Presentation.dll
Uses the Engine to present a CoordinateUniverse<TCoordinates> game world.
public abstract class CoordinatePresenter<TUniverse, TCoordinates> : PresenterBase<TUniverse>, IPresenter<TUniverse>, IDisposable where TUniverse : CoordinateUniverse<TCoordinates> where TCoordinates : struct
Type Parameters
TUniverse
The type of universe to present.
TCoordinates
Data type for storing position coordinates of objects in the game world.
- Inheritance
-
PresenterBase<TUniverse>CoordinatePresenter<TUniverse, TCoordinates>
- Implements
-
IPresenter<TUniverse>
- Derived
- Inherited Members
- Extension Methods
Constructors
CoordinatePresenter(Engine, TUniverse)
Creates a new presenter.
protected CoordinatePresenter(Engine engine, TUniverse universe)
Parameters
engine
EngineThe engine to use for rendering.
universe
TUniverseThe game world to present.
Fields
LightsSync
Maps between Positionables and Lights.
protected readonly ModelViewSync<Positionable<TCoordinates>, LightSource> LightsSync
Field Value
- ModelViewSync<Positionable<TCoordinates>, LightSource>
RenderablesSync
Maps between Positionables and Positionables.
protected readonly ModelViewSync<Positionable<TCoordinates>, PositionableRenderable> RenderablesSync
Field Value
- ModelViewSync<Positionable<TCoordinates>, PositionableRenderable>
Properties
BoundingBoxEntities
Visualize the bounding boxes of all entities
public bool BoundingBoxEntities { get; set; }
Property Value
BoundingSphereEntities
Visualize the bounding spheres of all entities
public bool BoundingSphereEntities { get; set; }
Property Value
WireframeEntities
Render all entities in wireframe-mode
public bool WireframeEntities { get; set; }
Property Value
Methods
Dispose(bool)
To be called by Dispose() and the object destructor.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue
if called manually and not by the garbage collector.
Initialize()
Generate Renderables from the Universe and keeps everything in sync using events
public override void Initialize()
Remarks
Should be called before HookIn() is used
Exceptions
- FileNotFoundException
A required Asset file could not be found.
- IOException
There was an error reading an Asset file.
- InvalidDataException
An Asset file contains invalid data.
RegisterRenderablesSync()
Hook to configure RenderablesSync and LightsSync.
protected virtual void RegisterRenderablesSync()