override public float added(RTGWorld rtgWorld, float x, float y) { float choice = rtgWorld.simplex.octave(octave).noise2((float)x / wavelength, (float)y / wavelength); if (choice <= startTransition) { return smoothTerrain.added(rtgWorld, x, y); } if (choice >= startTransition + transitionWidth) { return ruggedTerrain.added(rtgWorld, x, y); } // otherwise in the transition zone; float smooth = smoothTerrain.added(rtgWorld, x, y); float rugged = ruggedTerrain.added(rtgWorld, x, y); return ((choice - startTransition) * rugged + (startTransition + transitionWidth - choice) * smooth) / transitionWidth; }
override public float added(RTGWorld rtgWorld, float x, float y) { running = true; rtgWorld.simplex.riverJitter().evaluateNoise((float)x / wavelength, (float)y / wavelength, jitter); int pX = (int)Math.Round(x + jitter.deltax() * amplitude); int pY = (int)Math.Round(y + jitter.deltay() * amplitude); running = false; return(jittered.added(rtgWorld, pX, pY)); }
override public float added(RTGWorld rtgWorld, float x, float y) { float noise = rtgWorld.simplex.octave(octave).noise2(x / wavelength, y / wavelength); noise = TerrainBase.blendedHillHeight(noise, hillBottomSimplexValue); if (subordinate == null) { return(noise * height); } return(noise * (height + subordinate.added(rtgWorld, x, y))); }
override public float added(RTGWorld rtgWorld, float x, float y) { float noise = rtgWorld.simplex.octave(octave).noise2(x / wavelength, y / wavelength); if (noise > topSimplexValue) { noise = 1f; } else if (noise < bottomSimplexValue) { noise = 0f; } else { noise = (noise - bottomSimplexValue) / (topSimplexValue - bottomSimplexValue); } if (subordinate == null) { return(noise * height); } float added = subordinate.added(rtgWorld, x, y); return(noise * (height + added)); }
override public float added(RTGWorld rtgWorld, float x, float y) { return(one.added(rtgWorld, x, y) + two.added(rtgWorld, x, y)); }
override public float generateNoise(RTGWorld rtgWorld, int x, int y, float border, float river) { return(riverized(height.added(rtgWorld, x, y) + _base, river)); }