ISceneQueryResultBuilder
Description
- Derived from
Consumes intermediate scene query results that are produced by a ISceneQueryOp objects and builds the final scene query result.
The following logic is used to build the final scene query result from the sequence of intermediate query results:
-
When IBeginEnd.Begin is called, these steps are performed:
-
If there is a current result group
G
, push it onto the stack. -
Create a new result group
G
, which is initially empty. -
Process next event (i.e. begin, result or end).
-
-
When Result is called to output the intermediate result
R
, these steps are performed:-
Goto 8 if
R
is rejected by ISceneQuery.FilterAnyOf. -
Goto 8 if
R
if rejected by ISceneQuery.FilterDistance. -
Goto 8 if
R
if rejected by ISceneQuery.FilterNearest. -
Goto 8 if
R
if it is an ancestor of any element inG
, according to ISceneQueryResult.IsAncestorOrSelf. -
Remove all elements in
G
that are ancestors ofR
, according to ISceneQueryResult.IsAncestorOrSelf. -
Add
R
toG
. -
Remove all elements in
G
that are rejected by ISceneQuery.FilterNearest. -
Process next event (i.e. begin, result or end).
-
-
When IBeginEnd.End is called, these steps are performed:
-
Discard
G
, if rejected by ISceneQuery.FilterAllOf. -
If
G
contains exactly one element, use that element asR
.
Otherwise, wrap the elements ofG
in a GroupResult and use that asR
. -
Restore the previous result group
G
from the stack. -
Add
R
toG
. -
Remove all elements in
G
that are rejected by ISceneQuery.FilterNearest. -
Process next event (i.e. begin, result or end).
-
-
When there are no more events, the query result list is computed by sorting the elements in the final result group
G
according to SceneQueryResult.SortByDistanceAsc.
Public / Methods
Result
Outputs an intermediate query result.
To avoid unnecessary construction of scene query result objects, this method should only be called if all of the following methods return true
:
ResultCheck
3 overloads
Checks if any intermediate query result with the given query mask would be included in the final query result.
- See also
Checks if any intermediate query result within the given distance range would be included in the final query result.
- See also
Checks if any of the given intermediate query result types would be included in the final query results.
- See also