Table of Contents

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 Engine

The engine to use for rendering.

universe TUniverse

The 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

bool

BoundingSphereEntities

Visualize the bounding spheres of all entities

public bool BoundingSphereEntities { get; set; }

Property Value

bool

WireframeEntities

Render all entities in wireframe-mode

public bool WireframeEntities { get; set; }

Property Value

bool

Methods

Dispose(bool)

To be called by Dispose() and the object destructor.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true 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()