#pragma once

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

namespace world::generator {

    /// Abstract Noise generator
    class Abstract {
    public:
        using voxels = std::vector<Voxel>;

        /// Generate chunk voxels
        /// level 5: upto 32^3 voxels
        virtual void generate5(const voxel_pos &min, voxels &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 generate5(const voxel_pos &, voxels &out) override {
            out = {Voxel()};
        }
        glm::vec3 getGravity(const voxel_pos&) const override { return glm::vec3(0); }
    };

}