# Brute Force OBB Fitting

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

## 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 on other sites

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

##### 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

• 18
• 29
• 11
• 21
• 16