View Full Version : Oriented Bounding Box

03 March 2009, 07:35 AM
Is there any way to access the oriented bounding box that 3ds Max automatically draws around the current selection?

I have a feeling that this is not always the tightest one, but I would rather use this than implement the whole computation myself.

Any help would be appreciated.


03 March 2009, 11:16 AM
i'd loop trough the objects and get the max and min point saveing to a higer level var
then use these 2 to create your BB or a dummy. at least thats what i'd do, but i'm sure theres a better way

03 March 2009, 12:22 PM
you should be able to get the bounding box in the object's local coordinate system using something like...
nodeGetBoundingBox $ $.transform

If you make a box based on this, move it over to the object's position and rotation and it should be a match

03 March 2009, 12:24 PM
If you're in 2008+, or using the Avguard extensions, check out: nodeLocalBoundingBox <node>

EDIT: oops, done it again.

03 March 2009, 01:26 PM
Thx guys, the nodeGetBoundingBox / nodeLocalBoundingBox functions work fine!

CGTalk Moderation
03 March 2009, 01:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.