Bounding Boxes



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/11/2005 at 23:53, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.012 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    There are two questions I need to ask about GetMp() and GetRad() :

    1. GetMp() returns the 'local space' center. I need the global center. Does this mean that I have to apply all of the parent matrix transforms to this Vector to get to global space? (I'm assuming - Yes).

    2. GetRad() returns a vector representing the half-dimensions off of the center. Are these locally aligned with respect to object's axes?

    I'm starting to think that my previous method (in COFFEE) was much more efficient if 1. and 2. are TRUE. Global bounding boxes are required for the intersection testing that needs to be done.

    Thanks,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/12/2005 at 05:16, xxxxxxxx wrote:

    1. Yes, though that's of course only a matter of GetMg() * GetMp().
    2. Yes, I assume those would be local axes. I'm sure there's a clever method out there to quickly calculate the inscribing box in global coordinates. (Though this will often be a bigger box, I guess it won't matter too much since bounding boxes are kind of crude anyway.)
    On the other hand, have you considered looking into bounding box intersection algorithms to see if there is a way to quickly do intersection tests on non-aligned bounding boxes? (I wouldn't know.)


Log in to reply