Jump to content
  • Advertisement
Sign in to follow this  
Dirk Gregorius

Brute Force OBB Fitting

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

I implemented a brute force OBB fitting approach for a vertex cloud and I am thinking about which Euler angles range need to iterate. My intuition says -45 <= (yaw, pitch, roll) <= 45 should be sufficient. Does this make sense?

Edited by Dirk Gregorius

Share this post


Link to post
Share on other sites
Advertisement

That sounds awesome. But how do you iterate Euler ranges in your algorithm... are you using a least-squares method or something related?

Share this post


Link to post
Share on other sites

for ( yaw = -45; yaw < 45; yaw += increment )

  for ( pitch= -45; pitch< 45; pitch+= increment )

    for ( roll= -45; roll< 45; roll+= increment )

        Matrix3 rotation( yaw, pitch, roll );

        AABB aabb = BuildLocalBounds( rotation, vertexList )

        if ( aabb.Volume() < bestVolume )

        { 

            // Save volume, rotation, and aabb

        }

 

No least squares. It seems common sense for practical implementations to use a brute force approach. Depending on the increment you can also refine the interval.

Edited by Dirk Gregorius

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!