Show / Hide Table of Contents

Class NoiseProviderExtensions

Extension methods for INoiseProvider to support advanced noise sampling techniques.

Inheritance
object
NoiseProviderExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TerraProc.Core.Noise
Assembly: TerraProc.Core.dll
Syntax
public static class NoiseProviderExtensions

Methods

| Edit this page View Source

SampleBand(INoiseSource, double, double, double, double)

Sample the noise source at a specific frequency and amplitude.

Declaration
public static double SampleBand(this INoiseSource source, double x, double y, double freq, double amp)
Parameters
Type Name Description
INoiseSource source

Noise source.

double x

X coordinate.

double y

Y coordinate.

double freq

Frequency multiplier.

double amp

Amplitude multiplier.

Returns
Type Description
double

Noise value at the specified frequency and amplitude.

| Edit this page View Source

SampleOctaves(INoiseSource, double, double, int, double)

Compute a sum of samples at a number of octaves.

Declaration
public static double SampleOctaves(this INoiseSource source, double x, double y, int octaves, double persistence)
Parameters
Type Name Description
INoiseSource source

Noise source.

double x

X coordinate.

double y

Y coordinate.

int octaves

Number of octaves to sample.

double persistence

Persistence (amplitude multiplier) per octave.

Returns
Type Description
double

Normalized noise value in the range [0, 1].

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX