1234567891011121314151617181920212223 |
- #include "FactorizeNoise.h"
- FactorizeNoise::FactorizeNoise(Noise* a, Noise* b, double factorA)
- : Noise(),
- noiseA(a),
- noiseB(b),
- factorA(factorA)
- {}
- FactorizeNoise::~FactorizeNoise()
- {
- noiseA->release();
- noiseB->release();
- }
- int FactorizeNoise::getSeed() const {
- return noiseA->getSeed();
- }
- double FactorizeNoise::getNoise(double x, double y, double z) {
- return noiseA->getNoise(x, y, z) * factorA
- + noiseB->getNoise(x, y, z) * (1 - factorA);
- }
|