Moved scene util classes into a separate package.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@243 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: DisplayMisoSceneImpl.java,v 1.26 2001/08/13 15:00:24 shaper Exp $
|
// $Id: DisplayMisoSceneImpl.java,v 1.27 2001/08/14 21:29:40 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -11,6 +11,7 @@ import com.samskivert.util.StringUtil;
|
|||||||
import com.threerings.miso.Log;
|
import com.threerings.miso.Log;
|
||||||
import com.threerings.miso.tile.Tile;
|
import com.threerings.miso.tile.Tile;
|
||||||
import com.threerings.miso.tile.TileManager;
|
import com.threerings.miso.tile.TileManager;
|
||||||
|
import com.threerings.miso.scene.util.ClusterUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Scene object represents the data model corresponding to a single
|
* A Scene object represents the data model corresponding to a single
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoSceneView.java,v 1.41 2001/08/13 05:42:36 shaper Exp $
|
// $Id: IsoSceneView.java,v 1.42 2001/08/14 21:29:40 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ import com.threerings.miso.Log;
|
|||||||
import com.threerings.miso.sprite.*;
|
import com.threerings.miso.sprite.*;
|
||||||
import com.threerings.miso.tile.Tile;
|
import com.threerings.miso.tile.Tile;
|
||||||
import com.threerings.miso.tile.TileManager;
|
import com.threerings.miso.tile.TileManager;
|
||||||
|
import com.threerings.miso.scene.util.IsoUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <code>IsoSceneView</code> provides an isometric view of a
|
* The <code>IsoSceneView</code> provides an isometric view of a
|
||||||
|
|||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
//
|
//
|
||||||
// $Id: ClusterUtil.java,v 1.2 2001/08/10 21:17:07 shaper Exp $
|
// $Id: ClusterUtil.java,v 1.1 2001/08/14 21:29:40 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene.util;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.threerings.miso.Log;
|
import com.threerings.miso.Log;
|
||||||
|
import com.threerings.miso.scene.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <code>ClusterUtil</code> class provides utility routines for
|
* The <code>ClusterUtil</code> class provides utility routines for
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoUtil.java,v 1.4 2001/08/09 17:04:56 shaper Exp $
|
// $Id: IsoUtil.java,v 1.1 2001/08/14 21:29:40 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene.util;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.Polygon;
|
import java.awt.Polygon;
|
||||||
|
|
||||||
|
import com.threerings.miso.scene.*;
|
||||||
import com.threerings.miso.sprite.Path;
|
import com.threerings.miso.sprite.Path;
|
||||||
import com.threerings.miso.util.MathUtil;
|
import com.threerings.miso.util.MathUtil;
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// $Id: PathUtil.java,v 1.1 2001/08/14 21:29:40 shaper Exp $
|
||||||
|
|
||||||
|
package com.threerings.miso.scene.util;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import com.threerings.miso.Log;
|
||||||
|
import com.threerings.miso.tile.Tile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <code>PathUtil</code> class provides utility routines for
|
||||||
|
* finding a reasonable path between two points in a scene.
|
||||||
|
*/
|
||||||
|
public class PathUtil
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Return a list of <code>Point</code> objects representing a path
|
||||||
|
* from coordinates (ax, by) to (bx, by), inclusive, determined by
|
||||||
|
* performing an A* search in the given array of tiles.
|
||||||
|
*
|
||||||
|
* @param tiles the tile array.
|
||||||
|
* @param ax the starting x-position in tile coordinates.
|
||||||
|
* @param ay the starting y-position in tile coordinates.
|
||||||
|
* @param bx the ending x-position in tile coordinates.
|
||||||
|
* @param by the ending y-position in tile coordinates.
|
||||||
|
*
|
||||||
|
* @return the list of points in the path.
|
||||||
|
*/
|
||||||
|
public static ArrayList getAStarPath (
|
||||||
|
Tile tiles[][], int ax, int ay, int bx, int by)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user