NoiseInterpolator.h 574 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <Cache.h>
  3. #include <Point.h>
  4. #include <RCPointer.h>
  5. #include "Noise.h"
  6. class NoiseInterpolator : public Noise
  7. {
  8. Framework::Point 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. };