#pragma once

#include <vector>
#include <cstdint>
#include <Eigen/Dense>

namespace ZL {

    class PerlinNoise {
        std::vector<int> p;
    public:
        PerlinNoise();
        PerlinNoise(uint64_t seed);

        float fade(float t);
        float lerp(float t, float a, float b);
        float grad(int hash, float x, float y, float z);

        float noise(float x, float y, float z);

        float getSurfaceHeight(Eigen::Vector3f pos, float noiseCoeff);
    };

} // namespace ZL