Class HalfPlaneHint


  • public class HalfPlaneHint
    extends AngleHint
    A special ase of AngleHint with 180 degrees or Math.PI radians, defining a HalfPlane in which the treasure lies
    • Constructor Detail

      • HalfPlaneHint

        public HalfPlaneHint​(org.locationtech.jts.geom.Coordinate center,
                             org.locationtech.jts.geom.Coordinate right,
                             boolean visualisation)
      • HalfPlaneHint

        public HalfPlaneHint​(org.locationtech.jts.geom.Coordinate center,
                             org.locationtech.jts.geom.Coordinate right)
      • HalfPlaneHint

        public HalfPlaneHint​(org.locationtech.jts.geom.Coordinate pointOne,
                             org.locationtech.jts.geom.Coordinate pointTwo,
                             HalfPlaneHint.Direction direction)
        This constructor can be used when unsure whether pointOne or pointTwo is the right/left point of the hint but the direction of the hint is known.
    • Method Detail

      • getCenter

        public org.locationtech.jts.geom.Coordinate getCenter()
      • getRight

        public org.locationtech.jts.geom.Coordinate getRight()
      • getLeft

        public org.locationtech.jts.geom.Coordinate getLeft()
      • getHalfPlaneTheTreasureIsNotIn

        public HalfPlane getHalfPlaneTheTreasureIsNotIn()
      • getHalfPlaneLine

        public org.locationtech.jts.geom.LineSegment getHalfPlaneLine()
      • getHalfPlaneLineString

        public org.locationtech.jts.geom.LineString getHalfPlaneLineString()
      • inHalfPlane

        public boolean inHalfPlane​(org.locationtech.jts.geom.Coordinate coordinate)
      • approximatelyInHalfPlane

        public boolean approximatelyInHalfPlane​(org.locationtech.jts.geom.Coordinate coordinate)
      • getLowerHintPoint

        public org.locationtech.jts.geom.Coordinate getLowerHintPoint()
        Returns either the center or the right point The point with the lower y value gets returned.
      • getUpperHintPoint

        public org.locationtech.jts.geom.Coordinate getUpperHintPoint()
        Returns either the center or the right point The point with the higher y value gets returned.
      • pointsUpwards

        public boolean pointsUpwards()
        Returns:
        true if the treasure is above this hints line, false otherwise
      • pointsDownwards

        public boolean pointsDownwards()
        Returns:
        true if the treasure is below this hints line, false otherwise