Jump to content
  • Advertisement
Sign in to follow this  

obb conversion

This topic is 2992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

at the present moment i have the center of a box and the min vect and max vect

in a book it has the code for collision detection but it needs

struct OBB
point c; // obb center point
vector u[3]; // local x, y, z axis
vector e ; /// positive halfwidth extents of obb along each axis

this is what it says in the book but i not know how to convert to it

can any one help, or point me towards a good samplde code please

Share this post

Link to post
Share on other sites
You already have the centre of the box and the half-width for each axis can be determined with your Min and Max vectors. The local X, Y and Z axis can be calculated based on the rotation of the object being bounded (The way you do this will depend on how you are storing the object's orientation).

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!