예제 #1
0
        public bool Intersects(AABB aabb)
        {
            if (aabb.Area > Area) return aabb.Intersects(this);

            return 
                   IsPointInside(aabb.TopLeft)
                || IsPointInside(aabb.BottomRight)
                || IsPointInside(new Vector2(aabb.TopLeft.X, aabb.BottomRight.Y))
                || IsPointInside(new Vector2(aabb.TopLeft.Y, aabb.BottomRight.X));
        }