mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-03-04 04:56:37 +00:00
Refactor to use NoiseCollection instead of Noise
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "Chunk.h"
|
||||
#include "Maths/Vec2.h"
|
||||
#include <NoiseCollection.h>
|
||||
#include <Noise.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
Noise* NoiseCollection::GetNoise(const std::string& key) const
|
||||
@@ -10,3 +13,8 @@ Noise* NoiseCollection::GetNoise(const std::string& key) const
|
||||
Scop::FatalError("A non existant Noise has been requested");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::array<std::uint32_t, CHUNK_SIZE.y> NoiseCollection::GetBlocks(Scop::Vec2i pos)
|
||||
{
|
||||
return m_collection["terrain"]->GetHeight(pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user