From c6f1691bb7b275650d31109f840149b14ea3aeda Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 9 Oct 2006 21:43:49 +0000 Subject: [PATCH] OK, in this case the problem existed mostly between my keyboard and my chair. I better get that fixed. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@46 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/jme/model/Model.java | 21 ++++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/java/com/threerings/jme/model/Model.java b/src/java/com/threerings/jme/model/Model.java index 49a8e9bc..9be7d687 100644 --- a/src/java/com/threerings/jme/model/Model.java +++ b/src/java/com/threerings/jme/model/Model.java @@ -829,22 +829,17 @@ public class Model extends ModelNode */ protected void storeWorldBound () { - Quaternion orot = new Quaternion(getLocalRotation()); - Vector3f otrans = new Vector3f(getLocalTranslation()), - oscale = new Vector3f(getLocalScale()); - - getLocalRotation().set(Quaternion.IDENTITY); - getLocalTranslation().set(Vector3f.ZERO); - getLocalScale().set(Vector3f.UNIT_XYZ); - - updateWorldData(0f); + // update the bounds with an identity transform (which will be + // overwritten after this method is called) + getWorldRotation().set(Quaternion.IDENTITY); + getWorldTranslation().set(Vector3f.ZERO); + getWorldScale().set(Vector3f.UNIT_XYZ); + for (int ii = 0, nn = getQuantity(); ii < nn; ii++) { + getChild(ii).updateGeometricState(0f, false); + } updateWorldBound(); _storedBound = worldBound.clone(_storedBound); - - getLocalRotation().set(orot); - getLocalTranslation().set(otrans); - getLocalScale().set(oscale); } /**