public void Contain(ref MinBounding minBounding)
 {
     if (!this.setted || this.volume > minBounding.volume)
     {
         Set(ref minBounding);
     }
 }
 public void Set(ref MinBounding minBounding)
 {
     this.boxA   = minBounding.boxA;
     this.boxB   = minBounding.boxB;
     this.euler  = minBounding.euler;
     this.volume = minBounding.volume;
     this.setted = minBounding.setted;
 }
    static void _ProcessBoundingBoxAABB(
        ref SharedMinBounding sharedMinBounding,
        Vector3[] vertices,
        bool[] usedVertices,
        Vector3 minCenter,
        Euler beginEuler,
        Euler endEuler,
        int stepEuler)
    {
        if (vertices == null || usedVertices == null)
        {
            return;
        }

        Matrix4x4   transform   = Matrix4x4.identity;
        MinBounding minBounding = new MinBounding();

        for (int rz = beginEuler.z; rz < endEuler.z; rz += stepEuler)
        {
            for (int ry = beginEuler.y; ry < endEuler.y; ry += stepEuler)
            {
                for (int rx = beginEuler.x; rx < endEuler.x; rx += stepEuler)
                {
                    transform.SetTRS(Vector3.zero, Quaternion.Euler(rx, ry, rz), Vector3.one);
                    Vector3 tempBoxA = Vector3.zero, tempBoxB = Vector3.zero;
                    _GetBoundingBoxAABB(vertices, usedVertices, ref tempBoxA, ref tempBoxB, ref minCenter, ref transform);
                    Vector3 v          = (tempBoxB - tempBoxA);
                    float   tempVolume = _GetVolume(v);
                    Euler   tempEuler  = new Euler(rx, ry, rz);
                    minBounding.Contain(tempBoxA, tempBoxB, tempEuler, tempVolume);
                }
            }
        }

        sharedMinBounding.Contain(ref minBounding);
    }
 public void Contain(ref MinBounding minBounding)
 {
     this.minBounding.Contain(ref minBounding);
 }