Creates a warp geometry grid of a specific size and warp translation, in point arrays.


convenience init(columns: Int, rows: Int, sourcePositions: [SIMD2<Float>] = [SIMD2<Float>](), destinationPositions: [SIMD2<Float>] = [SIMD2<Float>]())



The number of columns in the grid.


The number of rows in the grid.


Optionally included array of the grid's source warp positions.


Optionally included array of the grid's destination warp positions.

Return Value

A new warp geometry grid object.


You supply the source and destination position as row-major arrays of normalized vector_float2 coordinates. The number of horizontal coordinates is the column count plus one and the number of vertical coordinates is the row count plus one. Passing nil as either of the position arguments results in an identity warp with vertices distributed evenly throughout the geometry. Passing nil to both sourcePositions and destPositions gives a result identical to init(columns:rows:).

See Also

Creating a Warp Geometry Grid

init(columns: Int, rows: Int)

Creates a warp geometry grid of a specified size.

init?(coder: NSCoder)

Tells you when to intialize a grid that was loaded from an archive.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software