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

<link>.swapPos

Create operator that swaps position coordinates

<link>.swapPos(  
[x,y,z]  
priority = 0  
target = viz.LINK_FULL_OP  
)  
[x,y,z]
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 position 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, and 3 is Z. Negative indices will negate the incoming value.

Return Value

Operator object

Example

link = viz.link(src,dst)

#Swap y,z coordinates and negate x coordinate
link.swapPos([-1,3,2])

See also

<link>.swapEuler
<link>.swapQuat