if(boundsObject.boundsIsInfinite) { center.x = center.y = center.z = 0.0; radius = Double.POSITIVE_INFINITY; updateBoundsStates(); return; }  if( boundsObject.boundId == BOUNDING_BOX){ if (tmpBox == null) { tmpBox = new BoundingBox( (BoundingBox)boundsObject); } else { tmpBox.set((BoundingBox)boundsObject); } tmpBox.transform(matrix); this.set(tmpBox); }else if( boundsObject.boundId == BOUNDING_SPHERE ) { matrix.transform(((BoundingSphere)boundsObject).center, this.center);  scale = matrix.getDistanceScale(); this.radius = ((BoundingSphere)boundsObject).radius * scale; if (Double.isNaN(radius)) {  center.x = center.y = center.z = 0.0; radius = -1.0; updateBoundsStates(); return; } } else if(boundsObject.boundId == BOUNDING_POLYTOPE) { if (tmpPolytope == null) { tmpPolytope = new BoundingPolytope((BoundingPolytope)boundsObject); } else { tmpPolytope.set((BoundingPolytope)boundsObject); } tmpPolytope.transform(matrix); this.set(tmpPolytope); } else { throw new IllegalArgumentException(J3dI18N.getString("BoundingSphere5")); }
    public void transform( Transform3D trans) {	double scale;	if(boundsIsInfinite)	    return;	trans.transform(center);	scale = trans.getDistanceScale();	radius = radius * scale;	if (Double.isNaN(radius)) {	    // Negative volume.	    center.x = center.y = center.z = 0.0;	    radius = -1.0;	    updateBoundsStates();	    return;	}    }