mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Minor refactor + comments
This commit is contained in:
parent
1d5037893c
commit
c0050cffaa
4 changed files with 19 additions and 10 deletions
|
|
@ -11,20 +11,26 @@ class VoxelRenderer;
|
|||
class ChunksLoader;
|
||||
class WorldGenerator;
|
||||
|
||||
/* ChunksController manages chunks dynamic loading/unloading */
|
||||
class ChunksController {
|
||||
private:
|
||||
Level* level;
|
||||
Chunks* chunks;
|
||||
Lighting* lighting;
|
||||
int64_t avgDurationMcs = 1000;
|
||||
uint padding;
|
||||
WorldGenerator* generator;
|
||||
|
||||
/* Average measured microseconds duration of loadVisible call */
|
||||
int64_t avgDurationMcs = 1000;
|
||||
|
||||
/* Process one chunk: load it or calculate lights for it */
|
||||
bool loadVisible();
|
||||
public:
|
||||
ChunksController(Level* level, Chunks* chunks, Lighting* lighting, uint padding);
|
||||
~ChunksController();
|
||||
|
||||
/* @param maxDuration milliseconds reserved for chunks loading */
|
||||
void update(int64_t maxDuration);
|
||||
bool loadVisible();
|
||||
};
|
||||
|
||||
#endif /* VOXELS_CHUNKSCONTROLLER_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue