ISceneQuery

Description

interface Tinman.Engine.Scenes.Queries.ISceneQuery

Base interface for classes that represent a spatial scene query.

The Filter* methods can be used to modify the spatial query, in order to produce different results. The Execute method will execute the query. The Result* methods can be used to access the query results.

Public / Methods

Execute


public method Execute → ()

returns → ISceneQuery

this

Executes the scene query and updates ResultList.

Filter​All​Of


[Pure]
public method FilterAllOf → (1)

mask in : SceneQueryResultType

The query result type mask.

returns → ISceneQuery

The resulting independent query object.

Retains only those query result groups that contain at least one result for each type in the given type mask in.

Filter​Any​Of


[Pure]
public method FilterAnyOf → (1)

mask in : SceneQueryResultType

The query result type mask.

returns → ISceneQuery

The resulting independent query object.

Retains only those intermediate query results which have a type (see ISceneQueryResult.Type) that is included in the given type mask in.

Filter​Distance


[Pure]
public method FilterDistance → (1)

range in : RangeD

The query result distance range.

returns → ISceneQuery

The resulting independent query object.

Retains only those intermediate query results whose query distance range (see ISceneQueryResult.Distance) intersects with the given range in.

Filter​Mask


[Pure]
public method FilterMask → (1)

queryMask in : int64

The spatial query mask.

returns → ISceneQuery

The resulting independent query object.

Retains only those intermediate query results for which the given query mask matches (see ISceneObject.QueryMask).

Filter​Nearest


[Pure]
public method FilterNearest → ()

returns → ISceneQuery

The resulting independent query object.

Retains only the nearest elements in each result group.

When the nearest filter is active, the smallest distance range end (i.e. RangeD.End of ISceneQueryResult.Distance) of all added intermediate query results is tracked. The set of nearest elements is then defined as those query results that have a distance range start (see RangeD.Start of ISceneQueryResult.Distance) that is not greater than the smallest distance range end.

Result​List


[Constant] [Pure]
public method ResultList → ()

returns → IVectorConst<ISceneQueryResult>

The sorted query result list.

Returns the sorted query result list.

Extensions

Filter​Only


[Pure]
public static method FilterOnly → (1)

mask in : SceneQueryResultType

The query result type mask.

returns → ISceneQuery

The resulting independent query object.

Result​First


[Pure]
public static method ResultFirst → (1)

types opt : SceneQueryResultType = SceneQueryResultType.All

The allowed query result types.

returns → ISceneQueryResult

The first query result or null if there are no matching query results.

Returns the first query result in the query result list that has one of the given result types.