/// <summary> /// Initializes a new instance of the <see cref="XTerrainChunk"/> class. /// </summary> /// <param name="setting">Setting.</param> /// <param name="noise">Noise.</param> /// <param name="x">The x coordinate.</param> /// <param name="z">The z coordinate.</param> public XTerrainChunk(XTerrainChunkSetting setting, XNoise noise, int x, int z) { HeightmapThread = new object(); Setting = setting; NoiseProvider = noise; Neighborhood = new XChunkNeighborhood(); Position = new XVec2I(x, z); TreePoint = new List <Vector3>(); ChopPoint = new List <Vector3>(); }
/// <summary> /// Inits the generate. /// </summary> public void InitGenerate() { Settings = new XTerrainChunkSetting(HeightmapResolution, AlphamapResolution, Length, Height, TerrainMaterial, Textures, Trees); NoiseProvider = new XNoiseDefault(); Cache = new XTerrainChunkCache(); }