Sign in to follow this  

Deriving OBB transform from 8-point notation

This topic is 3729 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

So here I have 8 vertices (I actually have face information too), as drawn by the artist... all in world coordinates. From this I need to derive the Collada OBB collision volume, meaning I need a translation, rotation and half-extents. Rotation is to be expressed as up to three rotations around arbitrary axes. For an AABB this is easy enough, but deriving the rotation for a non-aligned BB is causing me a bit of a headache. Any pointers would be very much appreciated!

Share this post


Link to post
Share on other sites
Take one vertex and its adjacent vertices. Subtract the first vertex from the others and normalize the results to get the columns of a rotation matrix (which can be converted into axis and angle if needed). When normalizing, save the length of the vectors and divide them by two to get the extents. Also multiply the normalized vectors by their corresponding extends and add them to the first vertex to get the center.

Share this post


Link to post
Share on other sites

This topic is 3729 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this