Type Method

gridWithColumns:rows:

Creates a warp geometry grid of a specified size.

Declaration

+ (instancetype)gridWithColumns:(NSInteger)cols rows:(NSInteger)rows;

Parameters

cols

The number of columns in the grid.

rows

The number of rows in the grid.

Return Value

A new warp geometry grid object.

Discussion

Creating a warp geometry grid without explicit source and destination positions automatically generates the required position arrays. For example, a 2 column by 2 row grid would create two arrays containing nine positions each, beginning at [0,0] - for the bottom left position - and ending at [1,1] - for the top left position.

Table 1

index: 6, position: [0.0, 1.0]

index: 7, position: [0.5, 1.0]

index: 8, position: [1.0, 1.0]

index: 3, position: [0.0, 0.5]

index: 4, position: [0.5, 0.5]

index: 5, position: [1.0, 0.5]

index: 0, position: [0.0, 0.0]

index: 1, position: [0.5, 0.0]

index: 2, position: [1.0, 0.0]

See Also

Creating a Warp Geometry Grid

- initWithColumns:rows:sourcePositions:destPositions:

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

+ grid

Initializes a new empty grid.

- initWithCoder:

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