geomc 1.0
A c++ linear algebra template library
|
Real-valued smooth noise over N
dimensions.
More...
#include <geomc/function/PerlinNoise.h>
Public Types | |
using | elem_t |
The coordinate type of this object. | |
using | grid_t = typename gridtype::point_t |
using | gridtype = PointType<index_t,N> |
using | point_t |
The type of a point in this object's space. | |
using | pointtype = PointType<T,N> |
Public Member Functions | |
PerlinNoise () | |
template<typename Generator> | |
PerlinNoise (Generator &rng) | |
T | eval (point_t pt) const |
std::pair< T, point_t > | gradient (point_t pt) const |
T | operator() (point_t pt) const |
Static Public Attributes | |
static constexpr index_t | N |
The dimension of this object. | |
Protected Member Functions | |
const point_t & | get_grid_gradient (const grid_t &pt) const |
Static Protected Member Functions | |
static grid_t | corner (index_t i) |
static T | dfade_dt (T t) |
static T | fade (T t) |
Real-valued smooth noise over N
dimensions.
Perlin noise has _O(2N)_ time cost.
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.
|
inline |
Construct a new perlin noise object with a std::random_device
as a source of random bits.
Construct a new perlin noise object with the supplied random number generator.
rng | A source of random bits. |
|
inline |
Evaluate the noise at pt
.
Evaluate the gradient of the noise function at pt
.
pt | Location at which to sample the noise function. |
noise(x)
, gradient(noise(x))
).