From 6acdb6daae2f015a38813317e8bd600b74faa55c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 2 Apr 2002 01:06:46 +0000 Subject: [PATCH] Act on an object's entire bounds rather than one constrained to the shape of the bottom of its footprint. This allows objects to spill out beyond their footprint (and not get clipped) as long as they are otherwise well behaved. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1172 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/miso/client/IsoSceneView.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/java/com/threerings/miso/client/IsoSceneView.java b/src/java/com/threerings/miso/client/IsoSceneView.java index a54f2ca82..dca31fbbc 100644 --- a/src/java/com/threerings/miso/client/IsoSceneView.java +++ b/src/java/com/threerings/miso/client/IsoSceneView.java @@ -1,5 +1,5 @@ // -// $Id: IsoSceneView.java,v 1.104 2002/03/26 23:35:01 ray Exp $ +// $Id: IsoSceneView.java,v 1.105 2002/04/02 01:06:46 mdb Exp $ package com.threerings.miso.scene; @@ -695,13 +695,13 @@ public class IsoSceneView implements SceneView Iterator iter = _objects.iterator(); while (iter.hasNext()) { ObjectMetrics metrics = (ObjectMetrics)iter.next(); - Polygon poly = metrics.bounds; - if (!poly.intersects(r)) { + Rectangle obounds = metrics.bounds; + if (!obounds.intersects(r)) { continue; } // get the dirty portion of the object - Rectangle drect = poly.getBounds().intersection(r); + Rectangle drect = obounds.intersection(r); int tx = metrics.x, ty = metrics.y; // compute the footprint if we're rendering those @@ -714,7 +714,7 @@ public class IsoSceneView implements SceneView // add the intersected section of the object to the dirty // items list _dirtyItems.appendDirtyObject( - metrics.tile, poly, foot, tx, ty, drect); + metrics.tile, obounds, foot, tx, ty, drect); // Log.info("Dirtied item: Object(" + tx + ", " + ty + ")"); } } @@ -920,8 +920,8 @@ public class IsoSceneView implements SceneView /** A reference to the object tile itself. */ public ObjectTile tile; - /** The object's bounding polygon. */ - public Polygon bounds; + /** The object's bounding rectangle. */ + public Rectangle bounds; } /** The sprite manager. */