Hi Gorg,
I had a look how you compute the covariance matrix and I have a few questions:

The covariance matrix shouldn’t depend on anything else than vertices if you want to get a tight bounding box. Why do you include triangle information in the calculation? Take a collection of points and find a tight bounding box. Now take the same collection of points and add some random triangles between these points (you don’t add more points). The bounding box should be the same as in the first calculation > it doesn’t depend on triangle information.

The way I compute the covariance matrix is:
I compute the mean position of all vertices of my convex hull: mu[3]
Then, for each vertice (p[3]) of my convex hull (c[3][3] which is the covariance matrix is initialized to zero):
for (i=0;i<n;i++)
{
float p[3];
p[0]=convHull[3i+0]; // x component of nth vertice
p[1]=convHull[3i+1]; // y component of nth vertice
p[2]=convHull[3i+2]; // z component of nth vertice
for (int j=0;j<3;j++)
for (int k=0;k<3;k++)
c[j][k]=c[j][k]+(p[j]mu[j])(p[k]mu[k]);
}
for (j=0;j<3;j++)
for (int k=0;k<3;k++)
c[j][k]=c[j][k]/n;

By computing it my way you can clearly see that the covariance matrix of a rotated cube is always diagonal. Where did I do a mistake?

The bounding box one can compute is never the tightest because to compute the covariance in a exact way, one should need to know in advance the center ((max+min)/2) of the bounding box (that means with max and min computed along the axis of the bounding box). Since me don’t know it in advance, we compute the mean (mu) which is an approximation of the real center.
What if we compute the bounding box in more than one passes?
First pass: mu=mean position of all vertices of the convex hull
Second pass: mu=center of the obtained bounding box (mu=(max+min)/2)
Third pass: mu=center of the obtained bounding box
…
I think that in that way we could find the tightest bounding box. What do you think?
Cheers,
Marc
(About your question: I implemented a incremental convex hull algorithm and when a point lies on a plane containing a triangle of my conv. hull, I just ignore it (I decide that it is just inside))