NoiseInterpolator.h 527 B

123456789101112131415161718192021
  1. #pragma once
  2. #include "Noise.h"
  3. #include "Punkt.h"
  4. #include "Cache.h"
  5. #include "RCPointer.h"
  6. class NoiseInterpolator : public Noise
  7. {
  8. Framework::Punkt noiseSize;
  9. Framework::Cache<int, Framework::RCPointer<Noise>> cache;
  10. std::function<Noise* (int)> noiseSupplier;
  11. int seed;
  12. double getRealNoise(double x, double y, double z);
  13. public:
  14. NoiseInterpolator(int seed, std::function<Noise* (int)> noiseSupplier, int width, int height);
  15. double getNoise(double x, double y, double z) override;
  16. int getSeed() const override;
  17. };