GetValue() public method

Generates an output value given the coordinates of the specified input value.
public GetValue ( float x, float y ) : float
x float The input coordinate on the x-axis.
y float The input coordinate on the y-axis.
return float
示例#1
0
        internal GcRandom(ChunkColumn chunki, int seed)
        {
            Chunk = chunki;
            _subtractForLessThanCutoff = _amplitude1 - _cutOff;
            _f1Xz = 1.0/_sxz;
            _f1Y = 1.0/_sy;

            if (_maxCaveHeight - _minCaveHeight > 128)
            {
                _caveBandBuffer = 32;
            }
            else
            {
                _caveBandBuffer = 16;
            }

            _noiseGen1 = new SimplexPerlin(seed, NoiseQuality.Fast);
            _noiseGen2 = new SimplexPerlin((int) _noiseGen1.GetValue(Chunk.X, Chunk.Z), NoiseQuality.Fast);
            _noiseGen3 = new SimplexPerlin((int) _noiseGen1.GetValue(Chunk.X, Chunk.Z), NoiseQuality.Fast);
        }