Search code examples
openglrotationcollision-detectionvertex

Get location of vertices for Collision Detection OpenGL


I am trying to figure out how to get the vertices of my cube after it has been rotates with glRotate3f()

Im using a sphere bounding box to narrow dow the possible collisions but I need to know the exact vertices to get an accurate collision. Can anyone help me figure this out. Thanks.


Solution

  • Perhaps not the answer you're looking for, but you're approaching your problem from the wrong angle. OpenGL should be used to draw your scene and only that. Scene management and anything that goes along with it (transformations, deformations...to name just a few) should be handled by you (or an appropriate framework).