fragment.pos

Syntax

Vector Access

v = fragment.pos(fg<,i>)

Get the fragment position. The fragment position is taken as the average position of the bodies.

Returns:

v - fragment position vector or component

Arguments:

fg - fragment pointer

i - optional vector component

Component Access

f = fragment.pos.x(fg)

Get the x-component of the fragment position.

Returns:f - x-component of the fragment position vector
Arguments:fg - fragment pointer
f = fragment.pos.y(fg)

Get the y-component of the fragment position.

Returns:f - y-component of the fragment position vector
Arguments:fg - fragment pointer
f = fragment.pos.z(fg) (3D only)

Get the z-component of the fragment position.

Returns:f - z-component of the fragment position vector
Arguments:fg - fragment pointer