Open topic with navigation
<node3d>.getBoundingBox
Returns bounding box
<node3d>.getBoundingBox( |
|
mode = viz.ABS_PARENT |
node = '' |
) |
|
mode = viz.ABS_PARENT
One of the following transform modes:
viz.ABS_PARENT viz.REL_PARENT | Return the bounding box in the parents coordinate system. |
viz.ABS_GLOBAL viz.REL_GLOBAL | Return the bounding box in global coordinates. |
viz.ABS_LOCAL viz.REL_LOCAL | Return the bounding box in the objects local coordinate system. |
node = ''
Name of subchild to retrive bounding box of
Remarks
This command will return an axis aligned BoundingBox object of the node.
Return Value
A BoundingBox object with the following properties:
<BoundingBox>.size = The dimensions of the bounding box
<BoundingBox>.width = The width of the bounding box (size along x axis)
<BoundingBox>.height = The height of the bounding box (size along y axis)
<BoundingBox>.depth = The depth of the bounding box (size along z axis)
<BoundingBox>.center = The center point of the bounding box
<BoundingBox>.xmin
<BoundingBox>.xmax
<BoundingBox>.ymin
<BoundingBox>.ymax
<BoundingBox>.zmin
<BoundingBox>.zmax
Example
ball = viz.add('ball.wrl')
box = ball.getBoundingBox()
boxSize = box.size
See also