Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm currently having trouble getting my head around QueryAABB, and hope to find some answers here.

  • The LowerBound of an AABB the upper-left corner (and vice versa). Why is that and what idea is behind that?
  • When exactly does an object count as inside the AABB and is therefor found by a query?
share|improve this question

1 Answer 1

up vote 0 down vote accepted

The idea is that you only need 2 points to define the Rectangle you will use in your AABB query. Draw point A and point B on a piece of paper. You can easily create a rectangle based on only these two points.

When an object is contained inside this rectangle, partially or fully, it will be returned as part of your AABB query. The trick is to store your objects in such a way that your query will run extremely fast, using techniques such as space partitioning.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.