Primitive Bounding Box

On 03/12/2017 at 18:02, xxxxxxxx wrote:

Is it possible to get information about Bounding Box of a primitive object?
In the documentation, I found information about a radius of object's bounding box.

On 04/12/2017 at 01:26, xxxxxxxx wrote:

What informations you need?
Actually you get all informations needed
Through BaseObject.GetMp() and BaseObject.GetRad()
Here is the bouding box size (remember we are in local space) simply do

mp = op.GetMp()
rad = op.GetRad()
mg = op.GetMg()
xMax = mp.x + rad.x
yMax = mp.y + rad.y
zMax = mp.z + rad.z
xMin = mp.x - rad.x
yMin = mp.y - rad.y
zMin = mp.z - rad.z
# Just an exemple to get in worldspace
zMinWorldSpace = (mp.z - rad.z) * mg

On 04/12/2017 at 02:25, xxxxxxxx wrote:


the function's name BaseObject.GetRad() may be a bit misleading, but it's exactly what you are looking for. GetRad() returns a vector, defining the size of the bounding box in each direction around the center. BaseObject.GetMp() returns the center of the bounding box.