ISceneQueryResult

Description

interface Tinman.Engine.Scenes.Queries.ISceneQueryResult

Base interface for classes that describe the result of a spatial query operation.

A scene query result may have zero or more logical parent results, which are defined as separate properties by derived interfaces. By convention, these properties are named Parent*. For example, a picked terrain point will have a terrain triangle as logical parent and the terrain triangle will have a terrain sector as logical parent. The IsAncestorOrSelf method can be used to query this relation.

Public / Methods

Accept


public method Accept → (2)

visitor in : ISceneQueryResultVisitor

[not-null]
The query result visitor object.

userData opt : object = null

Optional user data.

Accepts the given ISceneQueryResultVisitor object.

As


public method As → (1)

types in : SceneQueryResultType

The allowed query result types.

returns → ISceneQueryResult

The interpreted query result or null if this query result cannot be interpreted.

Interprets this query result as any of the given query result types.

If this cannot be interpreted as types in, the As method is called on each of the logical parent results and the first non-empty result is returned. If Type is SceneQueryResultType.Group and types in does not contain SceneQueryResultType.Group, the As method is called on each group element and the first non-empty result is returned.

IsAncestorOrSelf


public method IsAncestorOrSelf → (1)

result in : ISceneQueryResult

The query result to check.

returns → bool

true if result in is this or any of its logical ancestors,
false if it is not.

Checks if the given query result in is this or any of its logical ancestors.

Public / Attributes

Distance


public attribute Distance → (get)

value : RangeD

The distance range.

The distance range of this query result.

The range start is always greater than or equal to zero. If this result has logical parent results, the distance range of each parent will contain this range.

Type


public attribute Type → (get)

value : SceneQueryResultType

The query result type.

Returns the query result type.