예제 #1
0
        public override AxisAlignedBoundingBox GetAxisAlignedBoundingBox()
        {
            if (aabbMinXYZ.x == double.NegativeInfinity)
            {
                aabbMinXYZ = Vector3Float.ComponentMin(Vector3Float.ComponentMin(vertices[0], vertices[1]), vertices[2]);
                aabbMaxXYZ = Vector3Float.ComponentMax(Vector3Float.ComponentMax(vertices[0], vertices[1]), vertices[2]);
            }

            return(new AxisAlignedBoundingBox(new Vector3(aabbMinXYZ), new Vector3(aabbMaxXYZ)));
        }