1234567891011121314151617 |
- #include "ScaleNoise.h"
- ScaleNoise::ScaleNoise(Noise* base, double factor)
- : Noise(),
- base(base),
- factor(factor)
- {}
- int ScaleNoise::getSeed() const
- {
- return base->getSeed();
- }
- double ScaleNoise::getNoise(double x, double y, double z)
- {
- return MIN(MAX(base->getNoise(x, y, z) * factor, 0.0), 1.0);
- }
|