<node3d>.getBoundingSphere

Returns bounding sphere

 

<node3d>.getBoundingSphere(
    mode = viz.ABS_PARENT    
    node = ''    

)

 

mode = viz.ABS_PARENT

One of the following transform modes:

Transform modes

viz.ABS_PARENT
viz.REL_PARENT

Return the bounding sphere in the parents coordinate system.

viz.ABS_GLOBAL
viz.REL_GLOBAL

Return the bounding sphere in global coordinates.

viz.ABS_LOCAL
viz.REL_LOCAL

Return the bounding sphere in the objects local coordinate system.


node = ''

Name of subchild to retrive bounding sphere of


Remarks

This command will return the bounding sphere of the node.

Return Value

A BoundingSphere object with the following properties:

<BoundingSphere >.radius= The radius of the bounding sphere
<BoundingSphere >.center= The center point of the bounding sphere

Example

ball = viz.add('ball.wrl')
sphere = ball.getBoundingSphere()
radius = sphere.radius

See also

<node3d>.getBoundingBox