interface Tinman.Engine.Scenes.ISceneObject

Base interface for all scene objects.

Public / Methods


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.


public method QueryRay → (2)

ray in : Ray

The ray.

builder in : ISceneQueryResultBuilder

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.


public method QuerySceneObjectResult → (2)

distance in : float64

The distance of the query result.

builder in : ISceneQueryResultBuilder

The builder to use.

returns → SceneObjectResult

The query result or null if none.

Produces a SceneObjectResult for this ISceneObject.


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:

If CallbackMask returns SceneObjectCallback.None or the scene object is not enabled / not visible, no callbacks would be performed, which also would eliminate the automatic calls to this method. The IScene and ISceneView implementations take care of that by always calling the UpdateState method once per frame, when processing the IUpdateableFrameTime callback.

Public / Attributes


public attribute CallbackMask → (get)

value : SceneObjectCallback

The callback mask of this scene object.

Returns the callback mask that indicates which callbacks shall be performed.

This property may be used to tweak performance by returning only those callback flags for which an implementation provides an actual callback, instead of an empty default one.


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.


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?


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.


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.


public attribute UserData → (get,set)

value : object

The user data object or null.

Optional user data object to associate with this scene object.