Ejemplo n.º 1
0
        public Box2D FindTriangleBoundingBox(Point point0, Point point1, Point point2)
        {
            Box2D result = new Box2D();
            int   minX   = Min(point0.X, point1.X, point2.X);
            int   minY   = Min(point0.Y, point1.Y, point2.Y);
            int   maxX   = Max(point0.X, point1.X, point2.X);
            int   maxY   = Max(point0.Y, point1.Y, point2.Y);

            result.TopLeft     = new Point(minX, minY);
            result.BottomRight = new Point(maxX, maxY);
            return(result);
        }