BEPUphysics.CollisionShapes.ConvexShapes.TransformableShape.ComputeMaximumRadius C# (CSharp) Method

ComputeMaximumRadius() public method

Computes the maximum radius of the shape. This is often larger than the actual maximum radius; it is simply an approximation that avoids underestimating.
public ComputeMaximumRadius ( ) : float
return float
        public override float ComputeMaximumRadius()
        {
            //This will overestimate the actual maximum radius, but such is the defined behavior of the ComputeMaximumRadius function.  It's not exact; it's an upper bound on the actual maximum.
            RigidTransform transform = RigidTransform.Identity;
            BoundingBox boundingBox;
            GetBoundingBox(ref transform, out boundingBox);
            Vector3 diameter;
            Vector3.Subtract(ref boundingBox.Max, ref boundingBox.Min, out diameter);
            return diameter.Length();
            
        }