Contents
Interface IPositionSet
- All Known Implementing Classes:
EntityPositionProvider, PositionSetProvider
public interface IPositionSet
A position provider that can expose more than one matched element. The primary (e.g. the prioritiser's pick) is at
index 0. Single-element providers report a size of 1. This lets actions such as
ForEach iterate every match a
sensor produced rather than only the primary returned by IPositionProvider.getTarget().-
Method Summary
Modifier and TypeMethodDescriptiondefault booleangetOrientation(int index, Rotation3f out) Writes the orientation of elementindexintoout, when that element carries one.booleangetPosition(int index, org.joml.Vector3d out) Writes the position of elementindexintoout.getTarget(int index) intsize()
-
Method Details
-
size
int size()- Returns:
- the number of elements in the set (0 when empty).
-
getTarget
- Returns:
- the entity associated with element
index, or null when the element is a bare position with no entity (e.g. a computed point), whenindexis out of range, or when the entity is no longer valid.
-
getPosition
boolean getPosition(int index, org.joml.Vector3d out) Writes the position of elementindexintoout.- Returns:
- true if a position was written. false if
indexis out of range.
-
getOrientation
Writes the orientation of elementindexintoout, when that element carries one.- Returns:
- true if an orientation was written, false otherwise (in which case
outis left untouched).
-