mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
add variants (WIP)
This commit is contained in:
parent
01181b6403
commit
5478d121f0
16 changed files with 275 additions and 177 deletions
|
|
@ -56,6 +56,15 @@ public:
|
|||
return voxels[vox_index(bx - x, by - y, bz - z, w, d)].id;
|
||||
}
|
||||
|
||||
|
||||
inline voxel pickBlock(int bx, int by, int bz) const {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h ||
|
||||
bz >= z + d) {
|
||||
return {BLOCK_VOID, {}};
|
||||
}
|
||||
return voxels[vox_index(bx - x, by - y, bz - z, w, d)];
|
||||
}
|
||||
|
||||
inline light_t pickLight(int bx, int by, int bz) const {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h ||
|
||||
bz >= z + d) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue