Jump to content
  • Advertisement
Sign in to follow this  
Fabio de T P

How to evaluate OBB?

This topic is 4809 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 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]

Share this post


Link to post
Share on other sites
Advertisement
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!