private static BoundingSphere TransformBoundingSphere(BoundingSphere sphere, Matrix transform)
{
BoundingSphere transformedSphere;
Vector3 scale3 = new Vector3(sphere.Radius, sphere.Radius, sphere.Radius);
scale3 = Vector3.TransformNormal(scale3, transform);
transformedSphere.Radius = Math.Max(scale3.X, Math.Max(scale3.Y, scale3.Z));
transformedSphere.Center = Vector3.Transform(sphere.Center, transform);
return transformedSphere;
}