NegateNoise.cpp 324 B

123456789101112131415161718192021
  1. #include "NegateNoise.h"
  2. NegateNoise::NegateNoise(Noise* base)
  3. : Noise(),
  4. base(base)
  5. {}
  6. NegateNoise::~NegateNoise()
  7. {
  8. base->release();
  9. }
  10. int NegateNoise::getSeed() const
  11. {
  12. return base->getSeed();
  13. }
  14. double NegateNoise::getNoise(double x, double y, double z)
  15. {
  16. return 1.0 - base->getNoise(x, y, z);
  17. }