27 init_unscaled_xform();
28 _input_xform = _unscaled_xform;
42 int table_size,
unsigned long seed) :
45 init_unscaled_xform();
58 _unscaled_xform(copy._unscaled_xform),
59 _input_xform(copy._input_xform)
71 PerlinNoise::operator = (copy);
72 _unscaled_xform = copy._unscaled_xform;
73 _input_xform = copy._input_xform;
133 return (
float)
noise(value[0], value[1]);
173 INLINE
double PerlinNoise2::
174 grad(
int hash,
double x,
double y) {
178 case 0:
return x + y;
179 case 1:
return x - y;
180 case 2:
return -x + y;
181 case 3:
return -x - y;
185 case 4:
return 1.707 * x;
186 case 5:
return 1.707 * y;
187 case 6:
return -1.707 * x;
188 case 7:
return -1.707 * y;
This is the base class for PerlinNoise2 and PerlinNoise3, different dimensions of Perlin noise implem...
This is the base class for all two-component vectors and points.
void set_scale(double scale)
Changes the scale (frequency) of the noise.
double operator()(double x, double y) const
Returns the noise function of the two inputs.
This class provides an implementation of Perlin noise for 2 variables.
This is the base class for all two-component vectors and points.
void operator=(const PerlinNoise2 ©)
Makes an exact copy of the existing PerlinNoise object, including its random seed.
double noise(double x, double y) const
Returns the noise function of the three inputs.
static LMatrix3d scale_mat(const LVecBase2d &scale)
Returns a matrix that applies the indicated scale in each of the two axes.
PerlinNoise2()
Randomizes the tables to make a unique noise function.