public VoronoiGrid(VoronoiGridSettings settings) { this.settings = settings; rnd = new Random(); points = new Vector3d[settings.Size, settings.Size, settings.Size]; for (var z = 0; z < settings.Size; z++) { for (var y = 0; y < settings.Size; y++) { for (var x = 0; x < settings.Size; x++) { var cellCenter = new Vector3(x, y, z); points[x, y, z] = cellCenter + RandomDir() * (settings.Randomness / 2f); } } } }
public bool Equals(VoronoiGridSettings other) { return(Size == other.Size && Randomness.Equals(other.Randomness)); }
public VoronoiGridSettings(VoronoiGridSettings other) : this() { Size = other.Size; Randomness = other.Randomness; }