<node3d>.getChild

This action grabs a subchild from a child object

 

<node3d>.getChild(
    name    

)

 

name

Specifies the name of the object. This should correspond to the node name found in the scene graph file or the name given to the sub-object in the modeling program used to create this parent object.


Remarks

This command will create a new Vizard node3d object from the specified scene graph node.

If there are multiple scene graph nodes with the same name, then the first encountered node will be used.

Calling this command multiple times with the same name will return the same node3d object.

This command will slightly modify the underlying scene graph of the node by inserting a transform above the specified child node.

NOTE: This command does not work on underlying OpenSceneGraph osg::Drawable objects. The specified name must refer to an osg::Node object.

Return Value

<node3d> object

Example

parent = viz.add('robot_arm.wrl')
elbow = parent.getChild('elbow_joint')
elbow.setAxisAngle(1,0,0, 45)

See also

<node3d>.getChildren
<node3d>.getParents
<node3d>.getNodeNames
<node3d>.insertGroupAbove
<node3d>.insertGroupBelow