PDA

View Full Version : Oriented Bounding Box


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

http://img223.imageshack.us/img223/2971/3dsmaxorientedboundingb.png

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.

thx
M.

Insanto
03-03-2009, 10: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

ZeBoxx2
03-03-2009, 11:22 AM
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

drdubosc
03-03-2009, 11:24 AM
If you're in 2008+, or using the Avguard extensions, check out: nodeLocalBoundingBox <node>

EDIT: oops, done it again.

mak83
03-04-2009, 12:26 PM
Thx guys, the nodeGetBoundingBox / nodeLocalBoundingBox functions work fine!

CGTalk Moderation
03-04-2009, 12: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.