diff options
author | Harvey Harrison <[email protected]> | 2012-01-15 21:04:22 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-01-15 21:04:22 -0800 |
commit | 0dfc49a2042105d515d4177f31a3ef225c409ceb (patch) | |
tree | 23bf544c010f24ce144a3e21d9204cdbd4c5b4df | |
parent | 23f043f2f9fbd17a76b363f9a45b472cac382966 (diff) |
j3dcore: use the BoundingSphere constructor to get an empty bounds where desired
Signed-off-by: Harvey Harrison <[email protected]>
3 files changed, 6 insertions, 12 deletions
diff --git a/src/classes/share/javax/media/j3d/GroupRetained.java b/src/classes/share/javax/media/j3d/GroupRetained.java index 46c982d..a6986fa 100644 --- a/src/classes/share/javax/media/j3d/GroupRetained.java +++ b/src/classes/share/javax/media/j3d/GroupRetained.java @@ -161,8 +161,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface { if (VirtualUniverse.mc.useBoxForGroupBounds) { localBounds = new BoundingBox((Bounds) null); } else { - localBounds = new BoundingSphere(); - ((BoundingSphere) localBounds).setRadius(-1.0); + localBounds = new BoundingSphere((Bounds)null); } } @@ -2484,8 +2483,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface { if (VirtualUniverse.mc.useBoxForGroupBounds) { cachedBounds = new BoundingBox((Bounds) null); } else { - cachedBounds = new BoundingSphere(); - ((BoundingSphere) cachedBounds).setRadius(-1); + cachedBounds = new BoundingSphere((Bounds)null); } for (int i = children.size() - 1; i >= 0; i--) { NodeRetained child = (NodeRetained) children.get(i); @@ -2521,8 +2519,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface { if (VirtualUniverse.mc.useBoxForGroupBounds) { boundingObject = new BoundingBox((Bounds) null); } else { - boundingObject = new BoundingSphere(); - ((BoundingSphere) boundingObject).setRadius(-1.0); + boundingObject = new BoundingSphere((Bounds)null); } for (int i = children.size() - 1; i >= 0; i--) { NodeRetained child = (NodeRetained) children.get(i); diff --git a/src/classes/share/javax/media/j3d/SwitchRetained.java b/src/classes/share/javax/media/j3d/SwitchRetained.java index 5a0b595..e02a789 100644 --- a/src/classes/share/javax/media/j3d/SwitchRetained.java +++ b/src/classes/share/javax/media/j3d/SwitchRetained.java @@ -669,8 +669,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface if (VirtualUniverse.mc.useBoxForGroupBounds) { cachedBounds = new BoundingBox((Bounds) null); } else { - cachedBounds = new BoundingSphere(); - ((BoundingSphere) cachedBounds).setRadius(-1); + cachedBounds = new BoundingSphere((Bounds)null); } if (whichChild == Switch.CHILD_ALL) { for (i = 0; i < children.size(); i++) { @@ -728,8 +727,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface if (VirtualUniverse.mc.useBoxForGroupBounds) { boundingObject = new BoundingBox((Bounds) null); } else { - boundingObject = new BoundingSphere(); - ((BoundingSphere) boundingObject).setRadius(-1.0); + boundingObject = new BoundingSphere((Bounds)null); } if (whichChild == Switch.CHILD_ALL) { diff --git a/src/classes/share/javax/media/j3d/TransformGroupRetained.java b/src/classes/share/javax/media/j3d/TransformGroupRetained.java index 4f1781b..4d98a5e 100644 --- a/src/classes/share/javax/media/j3d/TransformGroupRetained.java +++ b/src/classes/share/javax/media/j3d/TransformGroupRetained.java @@ -807,8 +807,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface if (VirtualUniverse.mc.useBoxForGroupBounds) { boundingObject = new BoundingBox((Bounds) null); } else { - boundingObject = new BoundingSphere(); - ((BoundingSphere) boundingObject).setRadius(-1.0); + boundingObject = new BoundingSphere((Bounds)null); } if(boundsAutoCompute) { for (int i=children.size()-1; i>=0; i--) { |