raisim::PerlinNoise
class · #include <raisim/Terrain.hpp>
3D Perlin gradient noise with a seeded 256-entry permutation table (period 256 on each axis).
Constructors & destructor
PerlinNoise
cpp
explicit PerlinNoise(std::uint32_t seed=0)Parameters
| Parameter | Description |
|---|---|
seed (in) | seed of the permutation table |
Public member functions
reseed
cpp
void reseed(std::uint32_t seed)Rebuild the permutation table from a seed (std::mt19937 shuffle).
Parameters
| Parameter | Description |
|---|---|
seed (in) | new seed |
sample
cpp
double sample(double x, double y, double z) constParameters
| Parameter | Description |
|---|---|
x (in) | sample coordinate (noise lattice units) |
y (in) | sample coordinate |
z (in) | sample coordinate |
Returns the noise value; zero at integer lattice points