added support for 2d perlin noise
This commit is contained in:
@@ -25,20 +25,22 @@ namespace ReNoise {
|
||||
|
||||
/// \brief Generates a 1D Perlin noise array.
|
||||
///
|
||||
/// The noise is computed by interpolating between pseudo–random gradients at lattice points.
|
||||
/// The noise is computed by interpolating between pseudo-random gradients at lattice points.
|
||||
/// \param noiseResolution The number of noise samples to generate.
|
||||
/// \param rng A reference to an initialised ReUnirand random number generator.
|
||||
/// \return A vector of floats representing the 1D Perlin noise.
|
||||
std::vector<float> generatePerlinNoise1D(int noiseResolution, ReUnirand::MarsagliaUniRng &rng);
|
||||
std::vector<float> generatePerlinNoise2D(int noiseWidth, int noiseHeight, ReUnirand::MarsagliaUniRng &rng);
|
||||
|
||||
/// \brief Smooths a noise array using a parabolic kernel.
|
||||
///
|
||||
/// This function convolves the input noise array with a kernel whose weights follow a
|
||||
/// parabolic (hyperbolic parabola–like) curve.
|
||||
/// parabolic (hyperbolic parabola-like) curve.
|
||||
/// \param noise A vector containing the original noise values.
|
||||
/// \param kernelRadius The radius (number of neighbours on each side) to include in the smoothing.
|
||||
/// \return A vector of floats representing the smoothed noise.
|
||||
std::vector<float> smoothNoise(const std::vector<float> &noise, int kernelRadius);
|
||||
std::vector<float> smoothNoise1D(const std::vector<float> &noise, int kernelRadius);
|
||||
std::vector<float> smoothNoise2D(const std::vector<float>& noise, int noiseWidth, int noiseHeight, int kernelRadius);
|
||||
|
||||
} // namespace ReNoise
|
||||
|
||||
|
Reference in New Issue
Block a user