From d29fef39ba380b87f8aa402aed9380013c6407b5 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 26 Mar 2003 23:42:41 +0000 Subject: [PATCH] Added getFootprint(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2334 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/whirled/spot/data/Cluster.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/whirled/spot/data/Cluster.java b/src/java/com/threerings/whirled/spot/data/Cluster.java index f30c90469..a3c956d67 100644 --- a/src/java/com/threerings/whirled/spot/data/Cluster.java +++ b/src/java/com/threerings/whirled/spot/data/Cluster.java @@ -1,8 +1,10 @@ // -// $Id: Cluster.java,v 1.4 2003/03/26 02:37:08 mdb Exp $ +// $Id: Cluster.java,v 1.5 2003/03/26 23:42:41 mdb Exp $ package com.threerings.whirled.spot.data; +import java.awt.Rectangle; + import com.threerings.io.SimpleStreamableObject; import com.threerings.presents.dobj.DSet; @@ -19,6 +21,14 @@ public class Cluster extends SimpleStreamableObject /** The bounds of the cluster in the scene. */ public int x, y, width, height; + /** + * Returns the "footprint" of this cluster in tile coordinates. + */ + public Rectangle getFootprint () + { + return new Rectangle(x, y, width, height); + } + // documentation inherited public Comparable getKey () {