Files
Cubed/include/Cubed/gameplay/river_worm.hpp
zhenyan121 d5a12869e6 feat: include for glsl (#24)
* refactor(gameplay): remove unused includes and members, clear vertex data after upload

* feat(shader-tools): add recursive #include support for shader sources

* refactor(shaders): extract noise and sky color functions into shared GLSL includes
2026-06-23 10:27:17 +08:00

30 lines
647 B
C++

#pragma once
#include "Cubed/gameplay/chunk_pos.hpp"
#include "Cubed/gameplay/path.hpp"
#include <glm/glm.hpp>
#include <tbb/concurrent_hash_map.h>
namespace Cubed {
class RiverWorm {
public:
RiverWorm();
~RiverWorm();
void init(unsigned world_seed);
void reload(unsigned world_seed);
PathOrigin get_origin(const ChunkPos& origin_chunk) const;
int search_radius() const;
unsigned world_seed() const;
float river_probability() const;
bool has_origin_fast(const ChunkPos& pos) const;
private:
std::atomic<unsigned> m_world_seed{0};
std::atomic<float> m_probability{0.01f};
};
}; // namespace Cubed