Archived

This topic is now archived and is closed to further replies.

johnnyBravo

Possibly to generate bounding box depending on matrix rotation,scale etc?

Recommended Posts

johnnyBravo    100
Hi, is it possible to generate a bounding box that will automaitically fit in with the world matrix''s current scale and rotation settings, also the translation. So basically it gets me the edge points, eg a rectangle. Thanks,

Share this post


Link to post
Share on other sites
imDivineLight    132
You are talking about OOBs(Oriented Bounding Boxes) the rotate, scale with the object keeping a nice tight fit.

I only know hot to translate the AABB to another point, suppose you have a wall and it''s AABB having Min & Max points, you move wall to Point NewPos( 70, 100, 60 ) to move AABB also just add this Point ''NewPos'' to Min & Max points or AABB.

eg.

Mesh Wall.
Point NewPos = (0, 50, 0);
Wall.Move( NewPos );
AABB.Max += NewPos;
AABB.Min += NewPos;

Hope you got it, and if any one have some tutorial on OBBs please tell me!

Share this post


Link to post
Share on other sites