@Test public void testBallInsideGoal() { IRectangle field = Geometry.getField(); assertFalse(NGeometry.ballInsideGoal(Vector3.zero())); assertTrue(NGeometry.ballInsideGoal(Vector3.fromXY((field.xExtent() / 2) + 1, 0))); assertTrue(NGeometry.ballInsideGoal(Vector3.fromXY(-(field.xExtent() / 2) - 1, 0))); assertFalse(NGeometry.ballInsideGoal(Vector3.fromXYZ((field.xExtent() / 2) + 1, 0, Geometry.getGoalHeight()))); assertFalse( NGeometry.ballInsideGoal(Vector3.fromXY((field.xExtent() / 2) + Geometry.getGoalOur().getDepth() + 1, 0))); assertFalse( NGeometry.ballInsideGoal(Vector3.fromXY(-(field.xExtent() / 2) - Geometry.getGoalOur().getDepth() - 1, 0))); }
public static boolean ballInsideGoal(final IVector3 pos) { return ballInsideGoal(pos, 0, 0); }
NGeometry { public static boolean ballInsideGoal(final IVector3 pos) { return ballInsideGoal(pos, 0, 0); } }
NGeometry { public static boolean ballInsideGoal(final IVector3 pos) { return ballInsideGoal(pos, 0, 0); } private  NGeometry(); }
NGeometry { public static boolean ballInsideGoal(final IVector3 pos) { return ballInsideGoal(pos, 0, 0); } private  NGeometry(); static Goal getGoal(final ETeamColor color); static IRectangle getField(); static IRectangle getFieldSide(final ETeamColor color); static IPenaltyArea getPenaltyArea(final ETeamColor color); static IVector2 getPenaltyMark(final ETeamColor color); static List<IPenaltyArea> getPenaltyAreas(); static ETeamColor getTeamOfClosestGoalLine(final IVector2 pos); static IVector2 getClosestCorner(final IVector2 pos); static boolean ballInsideGoal(final IVector3 pos); static boolean ballInsideGoal(final IVector3 pos, final double goalLineMarginX, final double goalMarginDepth); static boolean posInsidePenaltyArea(final IVector2 pos, final double margin); }
NGeometry { public static boolean ballInsideGoal(final IVector3 pos) { return ballInsideGoal(pos, 0, 0); } private  NGeometry(); static Goal getGoal(final ETeamColor color); static IRectangle getField(); static IRectangle getFieldSide(final ETeamColor color); static IPenaltyArea getPenaltyArea(final ETeamColor color); static IVector2 getPenaltyMark(final ETeamColor color); static List<IPenaltyArea> getPenaltyAreas(); static ETeamColor getTeamOfClosestGoalLine(final IVector2 pos); static IVector2 getClosestCorner(final IVector2 pos); static boolean ballInsideGoal(final IVector3 pos); static boolean ballInsideGoal(final IVector3 pos, final double goalLineMarginX, final double goalMarginDepth); static boolean posInsidePenaltyArea(final IVector2 pos, final double margin);  }