Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Cpp/FastNoiseLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class FastNoiseLite
/// Default: 1337
/// </remarks>
void SetSeed(int seed) { mSeed = seed; }
int GetSeed() const { return mSeed; }

/// <summary>
/// Sets frequency for all noise types
Expand All @@ -152,6 +153,7 @@ class FastNoiseLite
/// Default: 0.01
/// </remarks>
void SetFrequency(float frequency) { mFrequency = frequency; }
float GetFrequency() const { return mFrequency; }

/// <summary>
/// Sets noise algorithm used for GetNoise(...)
Expand All @@ -164,6 +166,7 @@ class FastNoiseLite
mNoiseType = noiseType;
UpdateTransformType3D();
}
NoiseType GetNoiseType() const { return mNoiseType; }

/// <summary>
/// Sets domain rotation type for 3D Noise and 3D DomainWarp.
Expand All @@ -178,6 +181,7 @@ class FastNoiseLite
UpdateTransformType3D();
UpdateWarpTransformType3D();
}
RotationType3D GeRotationType3D() const { return mRotationType3D; }

/// <summary>
/// Sets method for combining octaves in all fractal noise types
Expand All @@ -187,6 +191,7 @@ class FastNoiseLite
/// Note: FractalType_DomainWarp... only affects DomainWarp(...)
/// </remarks>
void SetFractalType(FractalType fractalType) { mFractalType = fractalType; }
FractalType GetFractalType() const { return mFractalType; }

/// <summary>
/// Sets octave count for all fractal noise types
Expand All @@ -199,6 +204,7 @@ class FastNoiseLite
mOctaves = octaves;
CalculateFractalBounding();
}
int GetFractalOctaves() const { return mOctaves; }

/// <summary>
/// Sets octave lacunarity for all fractal noise types
Expand All @@ -207,6 +213,7 @@ class FastNoiseLite
/// Default: 2.0
/// </remarks>
void SetFractalLacunarity(float lacunarity) { mLacunarity = lacunarity; }
float GetFractalLacunarity() const { return mLacunarity; }

/// <summary>
/// Sets octave gain for all fractal noise types
Expand All @@ -219,6 +226,7 @@ class FastNoiseLite
mGain = gain;
CalculateFractalBounding();
}
float GetFractalGain() const { return mGain; }

/// <summary>
/// Sets octave weighting for all none DomainWarp fratal types
Expand All @@ -228,6 +236,7 @@ class FastNoiseLite
/// Note: Keep between 0...1 to maintain -1...1 output bounding
/// </remarks>
void SetFractalWeightedStrength(float weightedStrength) { mWeightedStrength = weightedStrength; }
float GetFractalWeightedStrength() const { return mWeightedStrength; }

/// <summary>
/// Sets strength of the fractal ping pong effect
Expand All @@ -236,7 +245,7 @@ class FastNoiseLite
/// Default: 2.0
/// </remarks>
void SetFractalPingPongStrength(float pingPongStrength) { mPingPongStrength = pingPongStrength; }

float GetFractalPingPongStrength() const { return mPingPongStrength; }

/// <summary>
/// Sets distance function used in cellular noise calculations
Expand All @@ -245,6 +254,7 @@ class FastNoiseLite
/// Default: Distance
/// </remarks>
void SetCellularDistanceFunction(CellularDistanceFunction cellularDistanceFunction) { mCellularDistanceFunction = cellularDistanceFunction; }
CellularDistanceFunction GetCellularDistanceFunction() const { return mCellularDistanceFunction; }

/// <summary>
/// Sets return type from cellular noise calculations
Expand All @@ -253,6 +263,7 @@ class FastNoiseLite
/// Default: EuclideanSq
/// </remarks>
void SetCellularReturnType(CellularReturnType cellularReturnType) { mCellularReturnType = cellularReturnType; }
CellularReturnType GetCellularReturnType() const { return mCellularReturnType; }

/// <summary>
/// Sets the maximum distance a cellular point can move from it's grid position
Expand All @@ -262,7 +273,7 @@ class FastNoiseLite
/// Note: Setting this higher than 1 will cause artifacts
/// </remarks>
void SetCellularJitter(float cellularJitter) { mCellularJitterModifier = cellularJitter; }

float GetCellularJitter() const { return mCellularJitterModifier; }

/// <summary>
/// Sets the warp algorithm when using DomainWarp(...)
Expand All @@ -275,7 +286,7 @@ class FastNoiseLite
mDomainWarpType = domainWarpType;
UpdateWarpTransformType3D();
}

DomainWarpType GetDomainWarpType() const { return mDomainWarpType; }

/// <summary>
/// Sets the maximum warp distance from original position when using DomainWarp(...)
Expand All @@ -284,7 +295,7 @@ class FastNoiseLite
/// Default: 1.0
/// </remarks>
void SetDomainWarpAmp(float domainWarpAmp) { mDomainWarpAmp = domainWarpAmp; }

float GetDomainWarpAmp() const { return mDomainWarpAmp; }

/// <summary>
/// 2D noise at given position using current settings
Expand Down