#pragma once

#include "./Noise.hpp"
#include "../Voxel.hpp"

namespace world::generator {

    /// Abstract Noise generator
    class Abstract {
    public:
        /// Generate chunk voxels
        virtual void generate(const chunk_pos &at, std::array<Voxel, CHUNK_SIZE> &out) = 0;
        /// Get gravity vector at given point
        virtual glm::vec3 getGravity(const voxel_pos& point) const = 0;
        /// Area visual curvature
        virtual std::optional<double> getCurvature() const { return std::nullopt; }
    };

    // Generate empty space
    class Void: public Abstract {
    public:
        struct Params { };
        Void() = default;

        void generate(const chunk_pos &, std::array<Voxel, CHUNK_SIZE> &out) override {
            out.fill(Voxel());
        }
        glm::vec3 getGravity(const voxel_pos&) const override { return glm::vec3(0); }
    };

}