Added convenience method to allow adding a node to a path without

specifying a direction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@326 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-09-05 00:40:17 +00:00
parent 37f18c3c3c
commit 24df6a0968
@@ -1,5 +1,5 @@
//
// $Id: LineSegmentPath.java,v 1.7 2001/08/21 21:18:42 mdb Exp $
// $Id: LineSegmentPath.java,v 1.8 2001/09/05 00:40:17 shaper Exp $
package com.threerings.media.sprite;
@@ -75,6 +75,18 @@ public class Path
_nodes.add(new PathNode(x, y, dir));
}
/**
* Add a node to the path with the specified destination point.
* An arbitrary direction will be assigned to the node.
*
* @param x the x-position.
* @param y the y-position.
*/
public void addNode (int x, int y)
{
_nodes.add(new PathNode(x, y, Path.DIR_NORTH));
}
/**
* Return the requested node index in the path, or null if no such
* index exists.