Creating OOBB from points
How can I create minimal OOBB for given points? Creating AABB or sphere is very easy, but I have problems creating minimal OOBB. [edit] First answer didn't get me good results. I don't have huge cloud of points. I have little amount of points. I am doing collision geometry generation. For example, cube has 36 points (6 sides, 2 triangles each, 3 points for each triangle). And algorithm from first post gave bad results for cube. Example points for cube: http://nopaste.dk/download/3382 (should return identity axis) The PCA/covariance/eigenvector method essentially finds the axes of an ellipsoid