ISceneEntityView

Description

interface Tinman.Engine.Scenes.ISceneEntityView

Represents the visual aspects of a scene entity for a specific scene view.

The various callback methods are invoked in the following order:

Public / Methods

Query​Screen


public method QueryScreen → (2)

point in : Vec2I

The point, in screen-space (see ISceneView.Bounds).

builder in : ISceneQueryResultBuilder

[not-null]
The query result builder to use.

Performs a spatial query to find the 2D screen elements that contain the given point in.

This method is used by ISceneQueryProvider.Query for operations created with SceneQueryOp.ForScreen.

Render3​D


public method Render3D → (1)

renderer in : Renderer

[not-null]
The renderer object to use.

Performs additional 3D rendering.

When this method is called the given renderer in will have been prepared:

Render​Offscreen


public method RenderOffscreen → (1)

context in : IGraphicsContext

[not-null]
The graphics context to use.

Performs custom offscreen rendering.

Custom offscreen rendering may involve the following steps:

Render​Prepare​Skipped


public method RenderPrepareSkipped → ()

This method is called instead of IRenderPreparable.RenderPrepare in order to notify the entity view that rendering is skipped in this frame.

Please note that the ISceneObject.UpdateState method is not called automatically when this callback is performed, as it is done with the other callbacks.

Scene​View​Attach


public method SceneViewAttach → (1)

sceneView in : ISceneView

[not-null]
The scene view.

This entity view has been attached to the given scene view.

This entity view must be compatible with the given sceneView in. Use SceneViewCheck to check for compatibility, if necessary.

RenderException

If a graphics subsystem error has occurred.

Scene​View​Check


public method SceneViewCheck → (1)

sceneView in : ISceneView

[not-null]
The scene view.

returns → bool

true if this entity view is compatible with sceneView in,
false if not.

Checks if this entity view can be attached to the given scene view.

Scene​View​Detach


public method SceneViewDetach → ()

This entity view has been detached from its scene view.

Public / Attributes

Owner


[Constant]
public attribute Owner → (get)

value : ISceneEntity

The owning scene entity or null if none.

The scene entity that owns this view.

The owning scene entity is usually (but not necessarily) the one that has created this scene entity view in its ISceneEntity.CreateView method. If the owning scene entity is disabled (see ISceneObject.Enabled), the owned scene entity view is also treated as if it had been disabled. When the owning scene entity is removed from the scene, all its scene entity views are also removed from their respective scene views.

By returning an owning ISceneEntity, the ISceneView.ViewOf method will be able to find and return this ISceneEntityView object.

Visible


public attribute Visible → (get,set)

value : bool

true to show this scene entity view, false to hide it.

Manually shows resp. hides this scene entity view.

Scene entity views are visible by default. Hidden scene entity views are processed as usual, except that they are excluded from rendering and spatial queries. If a scene entity view is disabled, it is treated as if it had been hidden.