i am a newbie in OGL and I’m in a problematic situation. you see, i have model with all its co-ordinates but it is not at the origin. so when i rotate it, it revolves around the origin and not about the origin.so i think i should first translate it to the origin and then rotate it and then translate it back to the original positio. the problem is how do i find the displacement between the origin and the model’s center to translate it to the origin. please help me.
the number of vertices shouldn’t be a problem, just precalculate the center using Panzer’s method and store it with the model information. The only problem I can imagine is if the model’s center or rotation isn’t at its center of mass, but for most models Panzer’s method will work
Yes, that’s right. But if, as chowe6685 said, your center lies at the objects center of mass then it won’t work.
But normally that isn’t the case and my method works.