Jump to content
  • Advertisement
Sign in to follow this  

Brute Force OBB Fitting

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

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!