From 24df6a0968aefc93516b9df81a82b6ca256969b7 Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Wed, 5 Sep 2001 00:40:17 +0000 Subject: [PATCH] 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 --- .../com/threerings/media/util/LineSegmentPath.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/util/LineSegmentPath.java b/src/java/com/threerings/media/util/LineSegmentPath.java index 2a121b3a2..76e1c0367 100644 --- a/src/java/com/threerings/media/util/LineSegmentPath.java +++ b/src/java/com/threerings/media/util/LineSegmentPath.java @@ -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.