This commit is contained in:
Marc Gilleron 2021-09-13 00:19:51 +01:00
parent e08e8c1986
commit 2fda5747c6
4 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,7 @@
class VoxelLibrary;
// TODO Rename VoxelModel? Or VoxelBlockyLibraryItem?
// TODO Rename VoxelBlockyLibraryItem?
// Definition of one type of voxel for use with `VoxelMesherBlocky`.
// A voxel can be a simple coloured cube, or a more complex model.
// Important: it is recommended that you create voxels from a library rather than using new().

View File

@ -8,7 +8,7 @@ namespace Transvoxel {
static const float TRANSITION_CELL_SCALE = 0.25;
// Values considered negative have a sign bit of 1
// SDF values considered negative have a sign bit of 1 in this algorithm
inline uint8_t sign_f(float v) {
return v < 0.f;
}

View File

@ -82,6 +82,7 @@ float VoxelDataMap::get_voxel_f(Vector3i pos, unsigned int c) const {
Vector3i bpos = voxel_to_block(pos);
const VoxelDataBlock *block = get_block(bpos);
if (block == nullptr) {
// TODO Not valid for a float return value
return _default_voxel[c];
}
Vector3i lpos = to_local(pos);

View File

@ -26,7 +26,7 @@ public:
FADING_OUT
};
Vector3i position;
Vector3i position; // In blocks
unsigned int lod_index = 0;
bool pending_transition_update = false;
VoxelRefCount mesh_viewers;