on-internet
← Community

Oriented Bounding Box is Misshapen and the Wrong Size in OpenGL

Stack Overflow ·

I'm writing a program in OpenGL to load a mesh and draw an oriented bounding box around said mesh. The mesh loads correctly, but when I draw the bounding box the box is the wrong shape and far too small. The process I used to calculate this box was to use principal component analysis to find a covariance matrix. I then got the eigenvectors of that matrix and used those as a local coordinate system to find the eight vertices of the cube. Then I calculated a transformation to move the cube from the local coordinate system to the global coordinate system. The code for calculating the covariance i

Comments

Sign in or sign up to comment and upvote.

No comments yet.