geomc 1.0
A c++ linear algebra template library
|
Real-valued smooth noise over N
dimensions.
More...
#include <geomc/function/PerlinNoise.h>
Public Types | |
typedef PointType< index_t, N > | gridtype |
typedef PointType< T, N > | pointtype |
typedef gridtype::point_t | grid_t |
typedef pointtype::point_t | point_t |
Coordinate type: Vec<T,N> if N > 0 ; T if N == 1 . | |
Public Member Functions | |
PerlinNoise () | |
PerlinNoise (Random *rng) | |
T | eval (point_t pt) const |
std::pair< T, point_t > | gradient (point_t pt) const |
Public Attributes | |
boost::shared_array< point_t > | gradients |
boost::shared_array< index_t > | p |
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 | fade (T t) |
static T | dfade_dt (T t) |
Friends | |
class | detail::_ImplPerlinInit< T, N > |
Real-valued smooth noise over N
dimensions.
Perlin noise has _O(2N)_ time cost.
|
inline |
Construct a new perlin noise object with the default (non-reentrant) random number generator.
|
inline |
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))
).