Exemplo n.º 1
0
        public bool Overlaps(AABB aabb)
        {
            Vector3 diff = aabb.ClosestPoint(center) - center;

            return(diff.Dot(diff) <= (radius * radius));
        }
Exemplo n.º 2
0
 public bool Overlaps(AABB other)
 {
     // test for not overlapped as it exits faster
     return(!(max.x < other.min.x || max.y < other.min.y ||
              min.x > other.max.x || min.y > other.max.y));
 }