From b791a041a25565c55a193c5c48f697a589efaf1b Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 14 Sep 2013 23:11:09 -0400 Subject: [PATCH] allow resetting the TileMap object being checked for collisions --- .../TileMapSweptSphereCollisionChecker.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/com/blarg/gdx/tilemap3d/TileMapSweptSphereCollisionChecker.java b/src/com/blarg/gdx/tilemap3d/TileMapSweptSphereCollisionChecker.java index 914beca..9fe0678 100644 --- a/src/com/blarg/gdx/tilemap3d/TileMapSweptSphereCollisionChecker.java +++ b/src/com/blarg/gdx/tilemap3d/TileMapSweptSphereCollisionChecker.java @@ -17,17 +17,13 @@ public class TileMapSweptSphereCollisionChecker implements SweptSphereWorldColli static final Vector3 b = new Vector3(); static final Vector3 c = new Vector3(); - TileMap tileMap; - - public TileMapSweptSphereCollisionChecker(TileMap tileMap) { - if (tileMap == null) - throw new IllegalArgumentException("tileMap can not be null."); - - this.tileMap = tileMap; - } + public TileMap tileMap; @Override public void checkForCollisions(SweptSphere sphere, BoundingBox possibleCollisionArea) { + if (tileMap == null) + throw new UnsupportedOperationException("No TileMap object is set."); + min.set(0, 0, 0); max.set(0, 0, 0);