mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
update world generation pipeline
This commit is contained in:
parent
f4793ac9db
commit
001b930212
9 changed files with 28 additions and 20 deletions
|
|
@ -39,6 +39,7 @@ namespace lua {
|
|||
std::shared_ptr<Heightmap> map;
|
||||
std::unique_ptr<fnl_state> noise;
|
||||
public:
|
||||
LuaHeightmap(const std::shared_ptr<Heightmap>& map);
|
||||
LuaHeightmap(uint width, uint height);
|
||||
|
||||
virtual ~LuaHeightmap();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@
|
|||
|
||||
using namespace lua;
|
||||
|
||||
LuaHeightmap::LuaHeightmap(const std::shared_ptr<Heightmap>& map)
|
||||
: map(map), noise(std::make_unique<fnl_state>(fnlCreateState())) {
|
||||
}
|
||||
|
||||
LuaHeightmap::LuaHeightmap(uint width, uint height)
|
||||
: map(std::make_shared<Heightmap>(width, height)),
|
||||
noise(std::make_unique<fnl_state>(fnlCreateState()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue