Handles the visual representation of World content in the OmegaEngine
More...
|
virtual double | MaxCameraRadius => 2250 |
| The value for StrategyCamera.MaxRadius. More...
|
|
bool | Lighting = true |
| Use lighting in this presentation? More...
|
|
readonly ModelViewSync< Positionable< TCoordinates >, PositionableRenderable > | RenderablesSync |
|
readonly ModelViewSync< Positionable< TCoordinates >, LightSource > | LightsSync |
|
readonly Engine | Engine |
|
readonly Scene | Scene |
|
Handles the visual representation of World content in the OmegaEngine
◆ Presenter()
FrameOfReference.Presentation.Presenter.Presenter |
( |
Engine |
engine, |
|
|
Universe |
universe |
|
) |
| |
|
inlineprotected |
Creates a new presenter.
- Parameters
-
engine | The engine to use for rendering. |
universe | The game world to present. |
◆ CameraController()
virtual double FrameOfReference.Presentation.Presenter.CameraController |
( |
DoubleVector3 |
coordinates | ) |
|
|
inlineprotectedvirtual |
Ensures the camera does not go under or outside the Terrain.
- Returns
- The minimum height the camera must have.
◆ CreateCamera()
Camera FrameOfReference.Presentation.Presenter.CreateCamera |
( |
CameraState< Vector2 > |
state = null | ) |
|
|
inlineprotected |
Creates a new camera based on a state usually loaded from the Universe.
- Parameters
-
state | The state to place the new camera in; null for default (looking at the center of the terrain). |
- Returns
- The newly created Camera.
◆ Dispose()
override void FrameOfReference.Presentation.Presenter.Dispose |
( |
bool |
disposing | ) |
|
|
inlineprotectedvirtual |
◆ RebuildTerrain()
void FrameOfReference.Presentation.Presenter.RebuildTerrain |
( |
| ) |
|
|
inline |
◆ RegisterRenderComponent< TComponent >()
void FrameOfReference.Presentation.Presenter.RegisterRenderComponent< TComponent > |
( |
RenderCompononentToEngine< TComponent > |
create | ) |
|
|
inlineprotected |
Registers a callback for converting a Render component to an Engine representation.
- Template Parameters
-
TComponent | The specific type of Render component to handle. |
- Parameters
-
create | The callback for mapping a Render component to an Engine representation. |
◆ RenderCompononentToEngine< TComponent >()
delegate PositionableRenderable FrameOfReference.Presentation.Presenter.RenderCompononentToEngine< TComponent > |
( |
Entity |
entity, |
|
|
TComponent |
component |
|
) |
| |
|
protected |
A callback for mapping a Render component to an Engine representation.
- Template Parameters
-
TComponent | The specific type of Render component to handle. |
- Parameters
-
entity | The entity containing the Render component. |
component | The Render component to visualize using the Engine. |
- Returns
- The generated Engine representation.
◆ SwitchMusicTheme()
void FrameOfReference.Presentation.Presenter.SwitchMusicTheme |
( |
string |
theme, |
|
|
bool |
immediate = false |
|
) |
| |
|
inlineprotected |
Switches the theme of the music played
- Parameters
-
theme | The new music theme |
immediate | Shall the current song be stopped and the new theme activated immediately? |
◆ UpdateLighting()
void FrameOfReference.Presentation.Presenter.UpdateLighting |
( |
| ) |
|
|
inlineprotected |
Updates _lightSun and _lightMoon based on the light phase in PresenterBase<TUniverse,TCoordinates>.Universe.
◆ UpdateRepresentation() [1/3]
void FrameOfReference.Presentation.Presenter.UpdateRepresentation |
( |
Positionable< Vector2 > |
element, |
|
|
IPositionable |
representation |
|
) |
| |
|
inlineprotected |
Applies the position of a Model element to a View representation.
◆ UpdateRepresentation() [2/3]
Applies the position and rotation of a Model element to a View representation.
◆ UpdateRepresentation() [3/3]
void FrameOfReference.Presentation.Presenter.UpdateRepresentation |
( |
Entity |
element, |
|
|
PointLight |
representation |
|
) |
| |
|
inlineprotected |
Applies the position and rotation of a Model element to a View representation.
◆ Lighting
bool FrameOfReference.Presentation.Presenter.Lighting = true |
|
protected |
Use lighting in this presentation?
◆ MaxCameraRadius
virtual double FrameOfReference.Presentation.Presenter.MaxCameraRadius => 2250 |
|
protected |
The value for StrategyCamera.MaxRadius.
◆ BoundingBoxEntities
bool FrameOfReference.Presentation.Presenter.BoundingBoxEntities |
|
getset |
Visualize the bounding boxes of all entities
◆ BoundingSphereEntities
bool FrameOfReference.Presentation.Presenter.BoundingSphereEntities |
|
getset |
Visualize the bounding spheres of all entities
◆ CameraState
CameraState<Vector2> FrameOfReference.Presentation.Presenter.CameraState |
|
get |
Retreives the current state of the Camera for storage in the Universe.
- Returns
- The current state of the Camera or
null
if it can not be determined at this time (e.g. cinematic animation in progress).
◆ Terrain
Terrain FrameOfReference.Presentation.Presenter.Terrain |
|
get |
◆ WireframeEntities
bool FrameOfReference.Presentation.Presenter.WireframeEntities |
|
getset |
Render all entities in wireframe-mode
◆ WireframeTerrain
bool FrameOfReference.Presentation.Presenter.WireframeTerrain |
|
getset |
The documentation for this class was generated from the following files:
- Presentation/Presenter.cs
- Presentation/Presenter.Lighting.cs
- Presentation/Presenter.Entities.cs