Example #1
0
        public float GetDistance(Vector3 position)
        {
            var q   = Extensions.AbsVec3(position - Position) - Size;
            var tmp = Extensions.MaxVec3(q, 0);

            return(tmp.Length() + MathF.Min(MathF.Max(q.X, MathF.Max(q.Y, q.Z)), 0.0f));
        }