ISceneObject

Description

interface Tinman.Engine.Scenes.ISceneObject

Base interface for all scene objects.

Public / Methods

QueryDistance


public method QueryDistance → (3)

mask in : int64

The spatial query filter bit-mask to use, see QueryMask.

point in : Vec3D

The point.

nearest opt : float64 = Maths.MaxDouble

The nearest distance that has already been found.

returns → float64

The nearest distance. Will be equal to nearest opt if the spatial query has no result.

Performs a spatial query to find the nearest distance from the given point in to this scene object.

This method is used by ISceneQueryProvider.QueryDistance.

QueryRay


public method QueryRay → (2)

ray in : Ray

The ray.

builder in : ISceneQueryResultBuilder

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

Performs a spatial query to find the intersection of the given ray in and this scene object.

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

QuerySceneObjectResult


public method QuerySceneObjectResult → (2)

distance in : float64

The distance of the query result.

builder in : ISceneQueryResultBuilder

[not-null]
The builder to use.

returns → SceneObjectResult

The query result or null if none.

Produces a SceneObjectResult for this ISceneObject.

UpdateState


public method UpdateState → ()

Updates the state of this scene object, in order to reflect all changes that have been made to this object since the last call to this method.

This method can be called repeatedly. If there is no need for updating the state, the method will return silently.

Automatic calls to this method are made just before processing of the following callbacks:

Public / Attributes

Enabled


public attribute Enabled → (get,set)

value : bool

true to enable this scene object, false to disable it.

Manually enables resp. disables this scene object.

Scene objects are enabled by default. Disabled scene objects are ignored during scene processing, i.e. they do not receive any callbacks (including rendering, so disabled scene objects are also invisible). State processing via UpdateState is always performed.

NeedsUpdateState


public attribute NeedsUpdateState → (get)

value : bool

true if UpdateState must be called in order to reflect the latest changes that have been made on this scene object.
false if the scene object already reflects all changes.

Does the state of this scene object need to be updated?

Order


[Constant]
public attribute Order → (get)

value : int32

The scene order value.

Returns the processing group of this scene object in its container.

Scene objects in a container (i.e. IScene.Entities or ISceneView.EntityViews) are grouped by their Order value and the groups are sorted ascending by their value. Within each group, the scene objects appear in the same order as they have been added to the container.

The default value is 0.

QueryMask


public attribute QueryMask → (get,set)

value : int64

The spatial query filter bit-mask.

A bit-mask that will be used by spatial queries to determine which scene objects to process and which to ignore.

When a spatial query is issued via ISceneQueryProvider, a query mask must be provided as method parameter. During processing of the spatial query, the parameter query mask and the query mask each scene object are combined with the bit-wise AND operator: if the result is zero, the scene object will be ignored for the spatial query.

Defaults to ~0.

UserData


public attribute UserData → (get,set)

value : object

The user data object or null.

Optional user data object to associate with this scene object.