<node3d>.setPosition

This action sets the position of a node.

 

<node3d>.setPosition(
    [x,y,z]    
    mode = viz.ABS_PARENT    

)

 

[x,y,z]

The [x,y,z] position to translate the object.


mode = viz.ABS_PARENT

Can be one of the following:

Transform modes

viz.ABS_PARENT

Perform the transformation absolutely in the parents coordinate system.

viz.ABS_GLOBAL

Perform the transformation absolutely in world coordinates.

viz.REL_LOCAL
viz.ABS_LOCAL

Perform the transformation in the objects local coordinates system.

viz.REL_PARENT

Perform the transformation relatively in the parents coordinate system.

viz.REL_GLOBAL

Perform the transformation relatively in the global coordinate system.


Remarks

This command will specify the position of the node.

Return Value

None

Example

ball = viz.add('ball.wrl')
ball.setPosition(1,0,2)