Advertisement

Brute Force OBB Fitting

Started by August 13, 2013 12:43 AM
1 comment, last by Dirk Gregorius 11 years, 6 months ago

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?

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

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.

This topic is closed to new replies.

Advertisement