public SetHeightsDelayLOD ( int xBase, int yBase, float heights ) : void | ||
xBase | int | |
yBase | int | |
heights | float | |
return | void |
public void FillTerrain(float[][] input, TerrainData tData, Terrain myTerrain, int xBase, int yBase) { /* Fills terrain with values from scanline and quantization, but it must be divided by large number. * Terrain needs float values between 0 and 1. */ res = tData.heightmapResolution; heights = new float[res, res]; for (int i = 0; i < res; i++) { for (int j = 0; j < res; j++) { heights[i, j] = input[i][j] / 70; } } tData.SetHeightsDelayLOD(xBase, yBase, heights); }