Saturday, August 28, 2010
Understanding Bounding Volumes (Paper and Code Download Included)
Over the course of the past month or so I've been working on a very detailed paper with complementary code samples on the topic of bounding volumes. I'm very happy (and relieved) to finally be able to share it with you.
Understanding Bounding Volumes thoroughly covers an integral aspect of collision detection. It explains the theory, usage, and operations required to use bounding volumes properly with explanations, graphics, and fully working code. The paper and code samples are specifically targeted at beginners, using relatively elementary language to explain what is commonly turned into an overly complicated topic. The actual samples and algorithms discussed are mostly specific to 2D volumes. Many of them (particularly the AABR and the BC) can easily be converted into their 3D equivalents.
Operations Discussed Include:
-Volume Construction
-Intersection Tests
-Closest Point Queries
-Distance Queries
-Volume Updates
-and more...
The three volumes discussed are the Axis Aligned Bounding Box (AABB), the Sphere, and the Oriented Bounding Box(OBB). Actual algorithms and code are provided for their 2D equivalents, where my personal naming conventions differ.
Accessing the main document will require a .pdf reader. In each download it is titled understanding_bounding_volumes.pdf. The paper is roughly thirty pages long, but includes numerous pictures and code samples to ease you through it. If you are familiar with bounding volumes you may find a lot of things you already know. However, you may very well find new and useful information here as well. If you are a complete beginner, (I dare say) you've come to the right place. Major operations and tests are explained assuming a great deal of ignorance by the reader. The only prerequisite is a basic understanding of vector and matrix math.
All of the code samples are written in C#/XNA and provided in a Visual Studio Project. The code gives full demos for all of the operations described in the paper. These demos are not meant to stand on their own, but rather complement the explanations seen in the full paper. Primitives, text, and sequences are used to help the user visualize the data. The actual values of the volumes and points are drawn on screen. You can browse these demos with a keyboard and/or an Xbox 360 gamepad. Specific details for using the code can be found in the code_samples_user_guide.pdf file.
The full version includes the paper and the code samples. Downloads offering only the paper or the code are also offered below.
I'm offering this free of charge, so if you appreciate my work please say so in the comments and consider subscribing.
Downloads (Paper Only Available for now)
Full Paper and Code (zip)
Paper Only (zip)
Code Only (zip)
Labels:
AABB,
collision detection,
OBB,
Sphere,
understanding bounding volumes,
XNA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment