When testing bounding spheres as part of the collision detection process, I'm using this method:
public static BoundingSphere TransformBoundingSphere(Matrix m, BoundingSphere b)
{
var center = b.Center;
var edge = b.Center + Vector3.Right * b.Radius;
var worldCenter = Vector3.Transform(center, m);
var worldEdge = Vector3.Transform(edge, m);
return new BoundingSphere(worldCenter, (worldEdge - worldCenter).Length());
}
... to get a sphere in world coordinates (where m is a world matrix for the object encompassed by the original sphere).
(Yes, I'm aware that this relies on uniform scaling.)
This is obvious, reliable and easy, but is there a better way?