Bounding Box Creation

Started by
12 comments, last by AdmiralBinary 22 years, 4 months ago
Sorry to bump this post again but...

---------------

I finally got it all together...
...and then forgot where I put it.
Advertisement
Above post was a mistake. I meant to add my new question in the same post, but i pressed enter to make a new line and it posted it! Sorry ''bout that...

---------------

I finally got it all together...
...and then forgot where I put it.
OK, now for the question...

Firstly, if I want to get the current bounding box for a mesh, will I have to do this each frame? (Sounds like the vertex locking and mesh box computation would slow it down considerably).

Secondly, in order to get the right orientation for the bounding box, should I multiply it by the model''s world matrix? I''m kinda confused here, as I''m plodding blindly into the world of 3d without any solid knowledge of the maths involved - I''m hiding behind D3D API

---------------

I finally got it all together...
...and then forgot where I put it.
No, you don''t need to calculate the bounding box each frame. The bounding box should be calculated once. At each frame you''ll need to transform your bounding box with the world matrix in order to get the right orientation and position of the box. An alternative way is to mutiply the other object by the inverse of the world matrix of your mesh to get that object transformed into the world space of your mesh so that you can use the original bounding box without transformation.

This topic is closed to new replies.

Advertisement