@interface MaplyElevationGridChunk : MaplyElevationChunk
The Maply Elevation Chunk holds elevations for a single tile.
This object holds elevation data for a single tile. Each tile overlaps the the eastern and northern neighbors by one cell. Why? Because we’re generating triangles with these and they’re independent. Draw a picture, it’ll make sense.
Data values are currently onl 32 bit floating point. There may be a type parameter in the future.
Initialize with the data (with floats) and size.
This initializer takes an NSData object with the given number of samples. Don’t forget to add an extra one along the eastern and northern edges to match up with those tiles. You still need to pass in as many samples as you’re saying you are. So if you say 11 x 11, then there need to be 121 floats in the NSData object.
- (nonnull instancetype)initWithGridData:(NSData *_Nonnull)data sizeX:(unsigned int)sizeX sizeY:(unsigned int)sizeY;
init(gridData data: Data, sizeX: UInt32, sizeY: UInt32)
The NSData full of float (32 bit) samples.
Number of samples in X.
Number of samples in Y.