mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
split clouds to segments
This commit is contained in:
parent
c32029d5b3
commit
f0e5b54164
2 changed files with 119 additions and 61 deletions
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
#include "commons.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class Camera;
|
||||
class Shader;
|
||||
|
|
@ -22,5 +24,19 @@ public:
|
|||
int quality
|
||||
);
|
||||
private:
|
||||
std::array<std::unique_ptr<Mesh<ChunkVertex>>, 2> meshes;
|
||||
struct Layer {
|
||||
int diameter;
|
||||
int segmentSize;
|
||||
std::vector<std::unique_ptr<Mesh<ChunkVertex>>> meshes;
|
||||
};
|
||||
|
||||
std::array<Layer, 2> layers;
|
||||
|
||||
void draw(
|
||||
Shader& shader,
|
||||
Layer& layer,
|
||||
const Camera& camera,
|
||||
float timer,
|
||||
int layerId
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue