if (bounds instanceof BoundingSphere) {
Point3d sphCenter = ((BoundingSphere)bounds).getCenter();
double sphRadius = ((BoundingSphere)bounds).getRadius();
double sqDist = Utils.ptToSegSquare(sphCenter, origin, end, rayPt);
vector.sub (rayPt, origin);
distance = vector.length();
radius = getRadius (distance);
if (sqDist <= (sphRadius+radius)*(sphRadius+radius)) {
return true;
}