Original Post
My friend and I are working on a game (in C++), and I am currently making a "GameObject" class. The game object has an oriented bounding-box, an MD2, and some other stuff. I have pretty much everything integrated into the class except the MD2, which my friend coded. The MD2 is currently handling rotations using glRotatef, which is not good for me, as the game object is using a forward vector and up vector to express its orientation. The game object uses a rotate function quite similar to glRotatef; it takes an 3d vector contating the axis to rotate on, and a float with the amount to rotate by. The functions modifies the up and forward vectors so they are rotated by the given amount on the given axis. I was thinking of doing something similar with the MD2, but I don't know how to rotate A model using vectors, and I dont know how to reverse the process so I get the axis to rotate on and how much to roatate by based on the orientation vectors. The only solution I could think of is storing all rotations in the MD2, and then just perform them in order upon drawing the model. However, this would be really ineffcient after a lot of rotations. Any help would be great, thanks.