@Test public void testTrivialPath() throws Exception { Polygon p = new Polygon(new float[] { 0, 0, 10, 0, 10, 10, 0, 10 }); PathFinder pf = new PathFinder(p, null); Vector2 start = new Vector2(1, 1); PathFinder.PathIterator pi = pf.findPath(start, start, 1); assertTrue("there is a point in the trivial path", pi.hasNext()); assertTrue("the only point is the start == end", start.equals(pi.next())); assertTrue("there was only one point in the trivial path", !pi.hasNext()); }
public PathIterator findPath(Vector2 start, Vector2 finish, float step) { Array<PathPoint> pps = findPath(start, finish); return new PathIterator(pps, worldToView, step); }
PathFinder { public PathIterator findPath(Vector2 start, Vector2 finish, float step) { Array<PathPoint> pps = findPath(start, finish); return new PathIterator(pps, worldToView, step); } }
PathFinder { public PathIterator findPath(Vector2 start, Vector2 finish, float step) { Array<PathPoint> pps = findPath(start, finish); return new PathIterator(pps, worldToView, step); } PathFinder(Polygon pathBoundary, Matrix3 viewToWorld); }
PathFinder { public PathIterator findPath(Vector2 start, Vector2 finish, float step) { Array<PathPoint> pps = findPath(start, finish); return new PathIterator(pps, worldToView, step); } PathFinder(Polygon pathBoundary, Matrix3 viewToWorld); Matrix3 getViewToWorld(); Matrix3 getWorldToView(); PathIterator findPath(Vector2 start, Vector2 finish, float step); float scaleAt(Vector2 point); }
PathFinder { public PathIterator findPath(Vector2 start, Vector2 finish, float step) { Array<PathPoint> pps = findPath(start, finish); return new PathIterator(pps, worldToView, step); } PathFinder(Polygon pathBoundary, Matrix3 viewToWorld); Matrix3 getViewToWorld(); Matrix3 getWorldToView(); PathIterator findPath(Vector2 start, Vector2 finish, float step); float scaleAt(Vector2 point);  }