NoiseInterpolator.h 573 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "Cache.h"
  3. #include "Noise.h"
  4. #include "Punkt.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,
  15. std::function<Noise*(int)> noiseSupplier,
  16. int width,
  17. int height);
  18. double getNoise(double x, double y, double z) override;
  19. int getSeed() const override;
  20. };