Instance Method

sourcePosition(at:)

Returns the source position of a vertex.

Declaration

func sourcePosition(at index: Int) -> vector_float2

Parameters

index

The index of the position vertex to query.

Return Value

The normalized position of the specified vertex in sourcePositions.

Discussion

The specified index must be between 0 and the warp geometry grid's vertexCount - 1.

See Also

Accessing or Setting Grid Vertices

func destPosition(at: Int) -> vector_float2

Returns the destination position of a vertex.

func replacingByDestinationPositions(positions: [float2]) -> SKWarpGeometryGrid

Returns a copy of this grid, updated with the argument destination positions.

func replacingBySourcePositions(positions: [float2]) -> SKWarpGeometryGrid

Returns a copy of this grid, updated with the argument source positions.