Vizard 8 » Command Index » Vizard objects » node3d » <node3d>.setQuat
8.0

<node3d>.setQuat

Set the rotation of the object to the given Quaternion

<node3d>.setQuat(  
[x,y,z,w]  
mode = viz.ABS_PARENT # Positional argument
)  
[x,y,z,w]
The four numbers representing a Quaternion.
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 will set the rotation of the object to the given Quaternion

Return Value

None

Example

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

See also

<node3d>.setAxisAngle
<node3d>.setEuler
<node3d>.setMatrix
<node3d>.lookAt