hyades.physics.BoundingSquare.Intersects C# (CSharp) Method

Intersects() public method

public Intersects ( BoundingSquare &aabb ) : bool
aabb BoundingSquare
return bool
        public bool Intersects(ref BoundingSquare aabb)
        {
            // Exit with no intersecton if separated along an axis
            if (this.max.X < aabb.min.X || this.min.X > aabb.max.X) return false;
            if (this.max.Y < aabb.min.Y || this.min.Y > aabb.max.Y) return false;
            // Overlapping on all axis means AABBs are intersecting
            return true;
        }