/// <summary> /// Generate a random heightmap using mid point displacement and passed parameters. /// </summary> /// <param name="width"></param> /// <param name="depth"></param> /// <param name="min"></param> /// <param name="max"></param> /// <param name="settings"></param> public void GenerateMidPointHeightmap(int width, int depth, float min, float max, HeightmapMidPointSettings settings) { _width = width; _depth = depth; _minimumHeight = min; _maximumHeight = max; _midPointSettings = settings; _heightValues = new float[_width * _depth]; GenerateMidPointHeightmap(); }
/// <summary> /// Generate a random heightmap using mid point displacement and passed parameters. /// </summary> /// <param name="width"></param> /// <param name="depth"></param> /// <param name="min"></param> /// <param name="max"></param> /// <param name="settings"></param> public void GenerateMidPointHeightmap(int width, int depth, float min, float max, HeightmapMidPointSettings settings) { _width = width; _depth = depth; _minimumHeight = min; _maximumHeight = max; _midPointSettings = settings; _heightValues = new float[_width*_depth]; GenerateMidPointHeightmap(); }