-
- All Known Implementing Classes:
BoundsPointQuery,CallableBoundsPointQuery,PointQueryBase
public interface PointQueryUsed to calculate a position within a givenBounds.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PointQueryatOffset(double offsetX, double offsetY)UpdatesgetOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.PointQueryatOffset(Point2D offset)UpdatesgetOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).PointQueryatPosition(double positionX, double positionY)UpdatesgetPosition()to the newposition.PointQueryatPosition(Point2D position)UpdatesgetPosition()to the newposition.PointQueryatPosition(Pos position)UpdatesgetPosition()to a new one based on the givenposition.Point2DgetOffset()Point2DgetPosition()PointQueryonNode(Node node)Point2Dquery()Optional<Motion>queryMotion()
-
-
-
Method Detail
-
getPosition
Point2D getPosition()
- Returns:
- the position that stores the
xandypercentages (0.0 = 0% to 1.0 = 100%) to use when calculating a relative position within aBoundsobject.
-
getOffset
Point2D getOffset()
- Returns:
- the amount by which to offset the point calculated via
getPosition().
-
atPosition
PointQuery atPosition(Point2D position)
UpdatesgetPosition()to the newposition.- Parameters:
position- the new position- Returns:
- itself
-
atPosition
PointQuery atPosition(double positionX, double positionY)
UpdatesgetPosition()to the newposition.- Parameters:
positionX- the percentage to use: 0.0 (0%) to 1.0 (100%).positionY- the percentage to use: 0.0 (0%) to 1.0 (100%).- Returns:
- itself
-
atPosition
PointQuery atPosition(Pos position)
UpdatesgetPosition()to a new one based on the givenposition.- Parameters:
position- left/up = 0.0 (0%); center = 0.5 (50%); right/down = 1.0 (100%)- Returns:
- itself
-
atOffset
PointQuery atOffset(Point2D offset)
UpdatesgetOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).- Parameters:
offset- the amount by which to increase/decrease the offset's x and y values- Returns:
- itself
-
atOffset
PointQuery atOffset(double offsetX, double offsetY)
UpdatesgetOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.- Parameters:
offsetX- the amount by which to increase/decrease the offset's x valueoffsetY- the amount by which to increase/decrease the offset's y value- Returns:
- itself
-
query
Point2D query()
- Returns:
- a position that offsets the relative position within the initial
Boundsobject that is calculated viagetPosition()bygetOffset()amount.
-
onNode
PointQuery onNode(Node node)
-
-