mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
reduce Chunks.getChunkByVoxel calls in LightSolver
This commit is contained in:
parent
117199a3ec
commit
bf7732f68a
4 changed files with 47 additions and 27 deletions
|
|
@ -83,4 +83,10 @@ public:
|
|||
glm::vec3((x + 1) * CHUNK_W, INFINITY, (z + 1) * CHUNK_D)
|
||||
);
|
||||
}
|
||||
|
||||
bool isBlockInside(int x, int z) const {
|
||||
x -= this->x * CHUNK_W;
|
||||
z -= this->z * CHUNK_D;
|
||||
return x >= 0 && z >= 0 && x < CHUNK_W && z < CHUNK_D;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue