From 75c9c55dc445e010c1a77f27deb03fe07b685b6d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 16 Dec 2001 08:05:46 +0000 Subject: [PATCH] Moved setVelocity() into the Path interface. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@799 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/media/util/LineSegmentPath.java | 13 ++----------- src/java/com/threerings/media/util/Path.java | 14 +++++++++++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/java/com/threerings/media/util/LineSegmentPath.java b/src/java/com/threerings/media/util/LineSegmentPath.java index 69b458bd2..562a3ce80 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.12 2001/10/24 00:55:08 shaper Exp $ +// $Id: LineSegmentPath.java,v 1.13 2001/12/16 08:05:46 mdb Exp $ package com.threerings.media.sprite; @@ -66,16 +66,7 @@ public class LineSegmentPath implements Path return _nodes.size(); } - /** - * Sets the velocity of this sprite in pixels per millisecond. The - * velocity is measured as pixels traversed along the path that - * the sprite is traveling rather than in the x or y directions - * individually. Note that the sprite velocity should not be - * changed while a path is being traversed; doing so may result in - * the sprite position changing unexpectedly. - * - * @param velocity the sprite velocity in pixels per millisecond. - */ + // documentation inherited public void setVelocity (float velocity) { _vel = velocity; diff --git a/src/java/com/threerings/media/util/Path.java b/src/java/com/threerings/media/util/Path.java index 0594199a4..9061b3a8b 100644 --- a/src/java/com/threerings/media/util/Path.java +++ b/src/java/com/threerings/media/util/Path.java @@ -1,5 +1,5 @@ // -// $Id: Path.java,v 1.1 2001/09/13 19:10:26 mdb Exp $ +// $Id: Path.java,v 1.2 2001/12/16 08:05:46 mdb Exp $ package com.threerings.media.sprite; @@ -38,6 +38,18 @@ public interface Path */ public boolean updatePosition (Sprite sprite, long timestamp); + /** + * Sets the velocity of this sprite in pixels per millisecond. The + * velocity is measured as pixels traversed along the path that the + * sprite is traveling rather than in the x or y directions + * individually. Note that the sprite velocity should not be changed + * while a path is being traversed; doing so may result in the sprite + * position changing unexpectedly. + * + * @param velocity the sprite velocity in pixels per millisecond. + */ + public void setVelocity (float velocity); + /** * Paint this path on the screen (used for debugging purposes only). */