Frame of Reference Game API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Properties | List of all members
FrameOfReference.Presentation.InteractivePresenter Class Referenceabstract

Handles the visual representation of World content where the user can manually control the perspective More...

Inheritance diagram for FrameOfReference.Presentation.InteractivePresenter:
FrameOfReference.Presentation.Presenter FrameOfReference.Presentation.EditorPresenter FrameOfReference.Presentation.InGamePresenter

Public Member Functions

override void Initialize ()
 
void SwingCameraTo (CameraState< Vector2 > cameraState=null)
 Switches from the current camera view to a new view using a cinematic effect. More...
 
void SwingCameraTo (Vector2 target)
 Swings the camera to look at a specifc set of 2D coordinates. More...
 
void SwingCameraTo (PositionableRenderable target)
 Swings the camera to look at a specifc PositionableRenderable. More...
 
void TakeOverSelection ()
 Turns all currently selected Entitys into player-controlled characters. More...
 
void PerspectiveChange (Point pan, int rotation, int zoom)
 
virtual void Hover (Point target)
 
virtual void AreaSelection (Rectangle area, bool accumulate, bool done)
 
virtual void Click (MouseEventArgs e, bool accumulate)
 
virtual void DoubleClick (MouseEventArgs e)
 
- Public Member Functions inherited from FrameOfReference.Presentation.Presenter
override void Initialize ()
 
void RebuildTerrain ()
 Rebuilds the terrain from World.Universe.Terrain to reflect any modifications performed. More...
 
override void DimDown ()
 
override void DimUp ()
 

Protected Member Functions

 InteractivePresenter (Engine engine, Universe universe)
 Creates a new interactive presenter More...
 
override void Dispose (bool disposing)
 
abstract void MovePositionables (IEnumerable< Positionable< Vector2 >> positionables, Vector2 target)
 Moves one or more Positionable{TCoordinates}s to a new position. More...
 
virtual void PickPositionables (IEnumerable< Positionable< Vector2 >> positionables, bool accumulate)
 Adds one or more Positionable{TCoordinates}s to SelectedPositionables. More...
 
- Protected Member Functions inherited from FrameOfReference.Presentation.Presenter
 Presenter (Engine engine, Universe universe)
 Creates a new presenter. More...
 
override void Dispose (bool disposing)
 To be called by IDisposable.Dispose and the object destructor. More...
 
Camera CreateCamera (CameraState< Vector2 > state=null)
 Creates a new camera based on a state usually loaded from the Universe. More...
 
virtual double CameraController (DoubleVector3 coordinates)
 Ensures the camera does not go under or outside the Terrain. More...
 
void SwitchMusicTheme (string theme, bool immediate=false)
 Switches the theme of the music played More...
 
delegate PositionableRenderable RenderCompononentToEngine< TComponent > (Entity entity, TComponent component)
 A callback for mapping a Render component to an Engine representation. More...
 
void RegisterRenderComponent< TComponent > (RenderCompononentToEngine< TComponent > create)
 Registers a callback for converting a Render component to an Engine representation. More...
 
void UpdateRepresentation (Positionable< Vector2 > element, IPositionable representation)
 Applies the position of a Model element to a View representation. More...
 
void UpdateRepresentation (Entity element, PositionableRenderable representation)
 Applies the position and rotation of a Model element to a View representation. More...
 
void UpdateRepresentation (Entity element, PointLight representation)
 Applies the position and rotation of a Model element to a View representation. More...
 
override void RegisterRenderablesSync ()
 
void UpdateLighting ()
 Updates _lightSun and _lightMoon based on the light phase in PresenterBase{TUniverse,TCoordinates}.Universe. More...
 

Properties

MonitoredCollection
< Positionable< Vector2 > > 
SelectedPositionables [get]
 The Positionable{TCoordinates}s the user has selected with the mouse More...
 
- Properties inherited from FrameOfReference.Presentation.Presenter
bool WireframeTerrain [get, set]
 Render the OmegaEngine.Graphics.Renderables.Terrain in wireframe-mode More...
 
bool WireframeEntities [get, set]
 Render all entities in wireframe-mode More...
 
bool BoundingSphereEntities [get, set]
 Visualize the bounding spheres of all entities More...
 
bool BoundingBoxEntities [get, set]
 Visualize the bounding boxes of all entities More...
 
Terrain Terrain [get, set]
 The OmegaEngine representation of World.Universe.Terrain More...
 
CameraState< Vector2 > CameraState [get]
 Retreives the current state of the Camera for storage in the Universe. More...
 

Additional Inherited Members

- Protected Attributes inherited from FrameOfReference.Presentation.Presenter
virtual double MaxCameraRadius => 2250
 The value for StrategyCamera.MaxRadius. More...
 
bool Lighting = true
 Use lighting in this presentation? More...
 

Detailed Description

Handles the visual representation of World content where the user can manually control the perspective

Constructor & Destructor Documentation

FrameOfReference.Presentation.InteractivePresenter.InteractivePresenter ( Engine  engine,
Universe  universe 
)
inlineprotected

Creates a new interactive presenter

Parameters
engineThe engine to use for rendering
universeThe universe to display

Member Function Documentation

abstract void FrameOfReference.Presentation.InteractivePresenter.MovePositionables ( IEnumerable< Positionable< Vector2 >>  positionables,
Vector2  target 
)
protectedpure virtual

Moves one or more Positionable{TCoordinates}s to a new position.

Parameters
positionablesThe Positionable{TCoordinates}s to be moved.
targetThe terrain position to move the positionables to.

Implemented in FrameOfReference.Presentation.EditorPresenter, and FrameOfReference.Presentation.InGamePresenter.

virtual void FrameOfReference.Presentation.InteractivePresenter.PickPositionables ( IEnumerable< Positionable< Vector2 >>  positionables,
bool  accumulate 
)
inlineprotectedvirtual

Adds one or more Positionable{TCoordinates}s to SelectedPositionables.

Parameters
positionablesThe selected Positionable{TCoordinates}s.
accumulatetrue when the user wants the new selection to be added to the old one.

Reimplemented in FrameOfReference.Presentation.InGamePresenter.

void FrameOfReference.Presentation.InteractivePresenter.SwingCameraTo ( CameraState< Vector2 >  cameraState = null)
inline

Switches from the current camera view to a new view using a cinematic effect.

Parameters
cameraStateThe destination state of the camera; null for default (looking at the center of the terrain).
void FrameOfReference.Presentation.InteractivePresenter.SwingCameraTo ( Vector2  target)
inline

Swings the camera to look at a specifc set of 2D coordinates.

void FrameOfReference.Presentation.InteractivePresenter.SwingCameraTo ( PositionableRenderable  target)
inline

Swings the camera to look at a specifc PositionableRenderable.

void FrameOfReference.Presentation.InteractivePresenter.TakeOverSelection ( )
inline

Turns all currently selected Entitys into player-controlled characters.

Property Documentation

MonitoredCollection<Positionable<Vector2> > FrameOfReference.Presentation.InteractivePresenter.SelectedPositionables
get

The Positionable{TCoordinates}s the user has selected with the mouse


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