示例#1
0
 // Fill the mapNoise matrix with all the necessary noise values for the playing field
 void CalculateAllNoise()
 {
     // If the noise is a 2d heightmap
     if (dim == DIMENSIONS.TWO_DIMENSIONAL_NOISE)
     {
         // generate all the noise for the chunks to reference and grab
         mapNoise = Noise.Generate2DNoise(xMatrix, yMatrix, zMatrix, seed, scale, octaves, persistance, lacurnarity, offset2D, openMiddle);
     }
     else if (dim == DIMENSIONS.THREE_DIMENSIONAL_NOISE)             // if the noise is a 3d map
     {
         mapNoise = Noise.Generate3DNoise(xMatrix, yMatrix, zMatrix, seed, scale, octaves, persistance, lacurnarity, offset3D);
     }
     else                                                            // if the noise is a half full map
     {
         mapNoise = Noise.GenerateHallFullField(xMatrix, yMatrix, zMatrix);
     }
 }