diff --git a/src/java/com/threerings/miso/client/util/IsoUtil.java b/src/java/com/threerings/miso/client/util/IsoUtil.java index 49f382801..92d6b2441 100644 --- a/src/java/com/threerings/miso/client/util/IsoUtil.java +++ b/src/java/com/threerings/miso/client/util/IsoUtil.java @@ -1,5 +1,5 @@ // -// $Id: IsoUtil.java,v 1.17 2001/12/18 08:38:57 mdb Exp $ +// $Id: IsoUtil.java,v 1.18 2002/02/06 23:34:17 mdb Exp $ package com.threerings.miso.scene.util; @@ -142,6 +142,19 @@ public class IsoUtil return boundsPoly; } + /** + * Returns true if the footprints of the two object tiles overlap when + * the objects occupy the specified coordinates, false if not. + */ + public boolean objectFootprintsOverlap (ObjectTile tile1, int x1, int y1, + ObjectTile tile2, int x2, int y2) + { + return !(x2 > x1 - tile1.getBaseWidth() && + x1 > x2 - tile2.getBaseWidth() && + y2 > y1 - tile1.getBaseHeight() && + y1 > y2 - tile2.getBaseHeight()); + } + /** * Given two points in screen pixel coordinates, return the * compass direction that point B lies in from point A from an