Controls the rendering of a OmegaEngine.Graphics.Scene using a Cameras.Camera.
More...
|
bool | RenderedInLastFrame [get] |
| Was this view rendered in the this frame? More...
|
|
string | Name [get, set] |
| Text value to make it easier to identify a particular view More...
|
|
Rectangle | Area [get, set] |
| The screen area this view should fill (all zero for fullscreen) More...
|
|
bool | Visible = true [get, set] |
| Shall the scene be rendered? More...
|
|
bool | InvertCull [get, set] |
| Cull clockwise instead of counter-clockwise? More...
|
|
virtual int | FullAlpha [get, set] |
| The level of transparency from 0 (solid) to 255 (invisible) for the complete scene More...
|
|
virtual bool | Fog [get, set] |
| Automatically apply a fog using BackgroundColor and the Cameras clip planes More...
|
|
virtual bool | Lighting = true [get, set] |
| Is lighting used in RenderScene? More...
|
|
Color | BackgroundColor [get, set] |
| The background color and fog color of this scene - Color.Empty for no background, may use alpha-channel if FullAlpha is not set More...
|
|
Scene | Scene [get] |
| The scene containing the PositionableRenderables to be rendered. More...
|
|
Camera | Camera [get, set] |
| The camera describing how to look at the scene More...
|
|
Engine | Engine [get, set] |
| The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set! More...
|
|
bool | IsDisposed [get] |
| Indicates whether this object has been disposed and can therefore no longer be used. More...
|
|
Controls the rendering of a OmegaEngine.Graphics.Scene using a Cameras.Camera.
Multiple Views can share the same OmegaEngine.Graphics.Scene, but they should all have separate Cameras.Cameras.
◆ View() [1/2]
OmegaEngine.Graphics.View.View |
( |
Scene |
scene, |
|
|
Camera |
camera, |
|
|
Rectangle |
area = new Rectangle() |
|
) |
| |
|
inline |
Creates a new view for rendering
- Parameters
-
scene | The scene containing the PositionableRenderables to be rendered. Will NOT be disposed when EngineElement.Dispose is called. |
camera | The Camera to look at the Scene with |
area | The screen area this view should fill (leave empty for fullscreen) |
◆ View() [2/2]
OmegaEngine.Graphics.View.View |
( |
Color |
color | ) |
|
|
inline |
Creates a new view for rendering a plain color fullscreen
- Parameters
-
color | The plain color to render |
◆ ApplyPostShaders()
virtual void OmegaEngine.Graphics.View.ApplyPostShaders |
( |
bool |
sceneOnBackBuffer | ) |
|
|
inlineprotectedvirtual |
◆ IsToRender()
◆ Pick()
Pick an PositionableRenderable in 3D-space using the mouse
- Parameters
-
location | The screen space location to start the ray from (usually mouse coordinates) |
position | Returns the position of the vertex closest to the intersection in entity space |
- Returns
- The picked PositionableRenderable or
null
.
◆ PickingRay()
Ray OmegaEngine.Graphics.View.PickingRay |
( |
Point |
location | ) |
|
|
inline |
Generates a 3D picking ray.
- Parameters
-
location | The screen space location to start the ray from (usually mouse coordinates) |
- Returns
- A ray in world space starting at the Camera position moving towards the specified location .
◆ PrepareRenderTarget()
void OmegaEngine.Graphics.View.PrepareRenderTarget |
( |
| ) |
|
|
inlineprotected |
◆ RenderBackground()
virtual void OmegaEngine.Graphics.View.RenderBackground |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ RenderBody()
◆ SetupGlow()
void OmegaEngine.Graphics.View.SetupGlow |
( |
float |
blurStrength = 3 , |
|
|
float |
glowStrength = 1.5f |
|
) |
| |
|
inline |
Creates a glow-map of this view and adds it to ChildViews
- Parameters
-
blurStrength | How strongly to blur the glow map - values between 0 and 10 |
glowStrength | A factor by which the blurred glow color is multiplied - values between 0 and 100 |
Calling this method multiple times will have no effect
◆ SetupShadow()
void OmegaEngine.Graphics.View.SetupShadow |
( |
LightSource |
light | ) |
|
|
inline |
◆ ShaderToRenderTarget()
void OmegaEngine.Graphics.View.ShaderToRenderTarget |
( |
PostShader |
shader | ) |
|
|
inlineprotected |
◆ SwingCameraTo()
void OmegaEngine.Graphics.View.SwingCameraTo |
( |
Camera |
target, |
|
|
float |
duration = 1 |
|
) |
| |
|
inline |
Switches from the current camera view to a new view using a cinematic effect
- Parameters
-
target | The new camera |
duration | The complete transition time in seconds |
◆ AreaCenter
Point OmegaEngine.Graphics.View.AreaCenter |
Initial value:=> new Point(
_area.Location.X + _area.Size.Width / 2,
_area.Location.Y + _area.Size.Height / 2)
The center point of Area
◆ BackgroundQuadDirty
bool OmegaEngine.Graphics.View.BackgroundQuadDirty = true |
|
protected |
Does the background qaud need to be recreated?
◆ ChildViews
ICollection<TextureView> OmegaEngine.Graphics.View.ChildViews => _childViews |
◆ FloatingModels
ICollection<FloatingModel> OmegaEngine.Graphics.View.FloatingModels => _floatingModels |
A list of FloatingModels to be overlayed on top of the Scene. Use this for UI-like elements, e.g. axis-arrows.
Will be disposed when EngineElement.Dispose is called.
◆ PostShaders
ICollection<PostShader> OmegaEngine.Graphics.View.PostShaders => _postShaders |
A list of post-processing shaders to be applied after rendering the scene
Will be disposed when EngineElement.Dispose is called.
◆ RenderTarget
An alternative surface to render onto instead of the back-buffer
◆ TextureRenderTarget
virtual bool OmegaEngine.Graphics.View.TextureRenderTarget => false |
|
protected |
◆ Area
Rectangle OmegaEngine.Graphics.View.Area |
|
getset |
The screen area this view should fill (all zero for fullscreen)
◆ BackgroundColor
Color OmegaEngine.Graphics.View.BackgroundColor |
|
getset |
The background color and fog color of this scene - Color.Empty for no background, may use alpha-channel if FullAlpha is not set
◆ Camera
Camera OmegaEngine.Graphics.View.Camera |
|
getset |
The camera describing how to look at the scene
◆ Fog
virtual bool OmegaEngine.Graphics.View.Fog |
|
getset |
◆ FullAlpha
virtual int OmegaEngine.Graphics.View.FullAlpha |
|
getset |
The level of transparency from 0 (solid) to 255 (invisible) for the complete scene
◆ InvertCull
bool OmegaEngine.Graphics.View.InvertCull |
|
getset |
Cull clockwise instead of counter-clockwise?
◆ Lighting
virtual bool OmegaEngine.Graphics.View.Lighting = true |
|
getset |
Is lighting used in RenderScene?
◆ Name
string OmegaEngine.Graphics.View.Name |
|
getset |
Text value to make it easier to identify a particular view
◆ RenderedInLastFrame
bool OmegaEngine.Graphics.View.RenderedInLastFrame |
|
get |
Was this view rendered in the this frame?
Used to debug culling methods
◆ Scene
Scene OmegaEngine.Graphics.View.Scene |
|
get |
The scene containing the PositionableRenderables to be rendered.
Will NOT be disposed when EngineElement.Dispose is called.
◆ Visible
bool OmegaEngine.Graphics.View.Visible = true |
|
getset |
Shall the scene be rendered?
◆ PreRender
Action<Camera> OmegaEngine.Graphics.View.PreRender |
Occurs immediately before the Scene begins rendering. ChildViews will have been rendered already.
The documentation for this class was generated from the following files:
- OmegaEngine/Graphics/View.cs
- OmegaEngine/Graphics/View.Render.cs
- OmegaEngine/Graphics/View.Sorting.cs
- OmegaEngine/Graphics/View.Helpers.cs