SetMin() public method

public SetMin ( float bmin ) : void
bmin float
return void
        public static void splitRect(int axis, Rect3d source, Rect3d b1, Rect3d b2, float[] midpoint)
        {
            switch (axis)
            {
            case 0:
                b1.SetMin(source.mMin);
                b1.SetMax(midpoint[0], source.mMax[1], source.mMax[2]);

                b2.SetMin(midpoint[0], source.mMin[1], source.mMin[2]);
                b2.SetMax(source.mMax);
                break;

            case 1:
                b1.SetMin(source.mMin);
                b1.SetMax(source.mMax[0], midpoint[1], source.mMax[2]);

                b2.SetMin(source.mMin[0], midpoint[1], source.mMin[2]);
                b2.SetMax(source.mMax);
                break;

            case 2:
                b1.SetMin(source.mMin);
                b1.SetMax(source.mMax[0], source.mMax[1], midpoint[2]);

                b2.SetMin(source.mMin[0], source.mMin[1], midpoint[2]);
                b2.SetMax(source.mMax);
                break;
            }
        }
Beispiel #2
0
        public static void splitRect(int axis, Rect3d source, Rect3d b1, Rect3d b2, float[] midpoint)
        {
            switch (axis)
            {
                case 0:
                    b1.SetMin(source.mMin);
                    b1.SetMax(midpoint[0], source.mMax[1], source.mMax[2]);

                    b2.SetMin(midpoint[0], source.mMin[1], source.mMin[2]);
                    b2.SetMax(source.mMax);
                    break;
                case 1:
                    b1.SetMin(source.mMin);
                    b1.SetMax(source.mMax[0], midpoint[1], source.mMax[2]);

                    b2.SetMin(source.mMin[0], midpoint[1], source.mMin[2]);
                    b2.SetMax(source.mMax);
                    break;
                case 2:
                    b1.SetMin(source.mMin);
                    b1.SetMax(source.mMax[0], source.mMax[1], midpoint[2]);

                    b2.SetMin(source.mMin[0], source.mMin[1], midpoint[2]);
                    b2.SetMax(source.mMax);
                    break;
            }
        }