Reputation: 11369
I currently have a few objects rotating around my 3D world. Each of them have a BoundingBox
object associated with them. How do I update the bounding box values after calls to glRotate()
and glTranslate()
?
Upvotes: 0
Views: 492
Reputation: 234
To do that you have to loop over every vertex, calculate it's position in the world (multiply by modelview) and find minimum / maximum vertex coordinates within every object (just like when you compute it for the first time).
Upvotes: 1