Esempio n. 1
0
    private void ValidateOutput(LegacyHull a, LegacyHull b, Vector3 planeNormal)
    {
        float lengthA = a.LengthAlongAxis(planeNormal);
        float lengthB = b.LengthAlongAxis(planeNormal);

        float sum = lengthA + lengthB;

        if (sum < smallestValidLength)
        {
            a.Clear();
            b.Clear();
        }
        else if (lengthA / sum < smallestValidRatio)
        {
            a.Clear();
        }
        else if (lengthB / sum < smallestValidRatio)
        {
            b.Clear();
        }
    }