title: Pseudocode for Swept AABB Collision
body: <p>I think swept means determining if objects will collide at some point, not just whether they are currently colliding, but if I'm wrong tell me. </p>
  
  <p>I have objects with bounded boxes that are aligned on an axis. The boxes of objects can be different sizes, but they are always rectangular.</p>
  
  <p>I've tried and tried to figure out an algorithm to determine if two moving AABB objects will collide at some point, but I am having a really hard time. I read a question on here about determining the time intervals when the two objects will pass at some point, and I didn't have a problem visualizing it, but implementing it was another story. It seems like there are too many exceptions, and it doesn't seem like I am doing it correctly.</p>
  
  <p>The objects are only able to move in straight lines (though obviously they can change direction, e.g. turn around, but they are always on the axis. If they try to turn off the axis then it just doesn't work), and are bound to the axis. Their bounded boxes don't rotate or do anything like that. Velocity can change, but it doesn't matter since the point of the method is to determine whether, given the objects' current state, they are on a "collision course". If you need any more information let me know.</p>
  
  <p>If someone could provide some pseudocode (or real code) that would be great. I read a document called <a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBsQFjAA&amp;url=http%3A%2F%2Fwww.geometrictools.com%2FDocumentation%2FMethodOfSeparatingAxes.pdf&amp;ei=ljVWTMzwI8T38AbHqtmgBA&amp;usg=AFQjCNGU5Zd6k-BJvQo6jN0aYMZ73RZwyQ" rel="nofollow noreferrer">Intersection of Convex Objects: The Method of Separating Axes</a> but I didn't understand some of the pseudocode in it (what does Union mean)?</p>
  
  <p>Any help is appreciated, thanks.</p>