How to evaluate OBB?

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

Recommended Posts

I want to make OBB tree... but every where I look for how to evaluate the best box the fit the model with the minimal volume, i found " You need to find the first and second order statistic summarizing the vectors coordinates... and use covariance matrix and so on..." but i never had studied it yet... and i can t found what is it?? what is it??/ how I make it??? i just thought in a alternative, and stupid, method... I will take the model, evaluate a AABB, that is easy, and evaluate its volume... so I will do it (more or less this)
  for (i=1; i<=360; i++)
for (j=1; j<=360; j++)
for (k=1; k<=360; k++)
{
Rotate the shape i in X
Rotate the shape j in Y
Rotate the shape k in Z
Evaluate a new AABB
evaluate its volume...
compare it with the previous volume
if it is smaller, store i,j and k;
Rotate the shape -i in X
Rotate the shape -j in Y
Rotate the shape -k in Z
}
rotate the shape with the i stored in X
rotate the shape with the j stored in Y
rotate the shape with the k stored in Z
make the AABB
rotate this time the AABB and the shape -i in X
rotate this time the AABB and the shape -j in Y
rotate this time the AABB and the shape -k in Z

So then i will have my OBB... but i hope the the method with first and second order statistc summarization be more intelligent and quickly... please help me PS: how to detach the code in the forum?? [Edited by - Fabio de T P on June 14, 2005 11:34:26 PM]

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 12
• 15
• 11
• 12
• Forum Statistics

• Total Topics
634153
• Total Posts
3015844
×