ISceneView

Description

interface Tinman.Engine.Scenes.ISceneView

Represents a view into a scene.

Access to scene view functionality is provided by a hierarchy of interfaces and classes. As best practice, at a specific location in the code, the type with the highest generalization should be used:

  • ISceneView
    General purpose scene view management, independent on the scene view type, not including callbacks for application loop integration.

  • ISceneView2D
    Scene view functionality that is specific to 2D maps.

  • ISceneView3D
    Scene view functionality that is specific to 3D terrains.

  • SceneView
    Abstract base class that provides access to the callback for application loop integration.

Public / Methods

Entity​View​Add


public method EntityViewAdd → (2)

entityView in : ISceneEntityView own

[not-null]
The scene entity view to add.

focus opt : bool = false

If entityView in is ISceneEntityViewFocusable, assign it to Focused after adding it?

Adds an entity view to the scene.

The given entityView in must be compatible with this scene view. Use ISceneEntityView.SceneViewCheck to check for compatibility, if necessary.

RenderException

If a graphics subsystem error has occurred.

Entity​View​Remove


public method EntityViewRemove → (1)

entityView in : ISceneEntityView

[not-null]
The scene entity view to remove.

Removes an entity view from the scene.

The removal may be deferred, in order to avoid side-effects.

Evict


public method Evict → (1)

resource in : IResourceHandle

The resource handle that shall be evicted.

The given resource is no longer used and may be evicted from all GPU caches.

It is not necessary to call this method. However, if it is considered best practice that all scene entity views tell their scene view when a resource will never be used again, so that cleanup can be performed up-front.

Not​Ready


public method NotReady → ()

Marks this scene view as not ready.

The current please wait screen (see PleaseWait) is shown while the scene view is not ready.

View​Of


public method ViewOf → (1)

entity in : ISceneEntity

[not-null]
The owning scene entity.

returns → ISceneEntityView

The scene entity view that is owned by entity in or null if none.

Returns the ISceneEntityView in this scene view that is owned by the given entity in (see ISceneEntityView.Owner).

When a ISceneEntityView is added with EntityViewAdd (either automatically via ISceneEntity.CreateView or manually), its ISceneEntityView.Owner property is queried: if it has an owning ISceneEntity object, the scene view will store the relationship. The stored relationships are used to find the scene entity view that is owned by the given entity in. This implies that for each scene entity, at most one owned scene entity view can be stored.

Public / Attributes

Bounds


public attribute Bounds → (get,set)

value : Box2I

The screen bounds.

The screen bounds of this scene view.

See also

Graphics.Bounds

Entity​Views


[Constant]
public attribute EntityViews → (get)

value : IArrayVector<ISceneEntityView>

[not-null]
The scene entity view list.

The list of all scene entity views.

This is a flat list that contains all scene entity views. It is sorted in ascending order, according to the ISceneObject.Order values of the contained scene entity views.

Focused


public attribute Focused → (get,set)

value : ISceneEntityViewFocusable

The focused component.

The scene component that has the input focus.

Defaults to null.

Geocentric


[Constant]
public attribute Geocentric → (get)

value : Geocentric

[not-null]
The Geocentric object.

The Geocentric helper object, as returned by TerrainMesh.Geocentric.

Is​Ready


public attribute IsReady → (get)

value : bool

true if this scene view is ready, false if it is still loading.

Is this scene view ready?

Scene readiness is calculated from the refinement progress of the terrain mesh (see IMeshDynamic.Progress) and the progress of terrain texture loading (see TerrainView.TextureProgress).

Please​Wait


public attribute PleaseWait → (get,set)

value : PleaseWaitDelegate

The please wait screen or null.

Specifies the please wait screen to show while the scene view is not ready yet.

Scene


[Constant]
public attribute Scene → (get)

value : Scene

[not-null]
The Scene object.

The scene of this scene view.

Screen​Labels


[Constant]
public attribute ScreenLabels → (get)

value : ScreenLabelPlacement

[not-null]
The screen labels.

The screen labels.

For each frame, the screen labels are cleared.