Vizard 8 » Command Index » Vizard objects » link » <link>.swapQuat
8.0

<link>.swapQuat

Create operator that swaps quaternion coordinates

<link>.swapQuat(  
[x,y,z,w]  
priority = 0  
target = viz.LINK_FULL_OP  
)  
[x,y,z,w]
The swap indices
priority = 0
Priority of operator
target = viz.LINK_FULL_OP
One of the following values:

Link operator targets

viz.LINK_FULL_OP

The operator will be applied to combined data of the link.

viz.LINK_POS_OP

The operator will be applied to position data of the link.

viz.LINK_ORI_OP

The operator will be applied to orientation data of the link.

Remarks

This command will create an operator that will swap the quaternion coordinates of the incoming matrix based on the specified swap indices. The indices are 1-based, so 1 refers to the X coordinate, 2 is Y, 3 is Z, and 4 is W. Negative indices will negate the incoming value.

Return Value

Operator object

Example

link = viz.link(src,dst)

#Negate x,y coordinate of quaternion
link.swapQuat([-1,-2,3,4])

See also

<link>.swapEuler
<link>.swapPos