Removed old getVoxelAt()/setVoxelAt() functions. they've been flagged as deprecated for a while now, and are replaced by just getVoxel()/setVoxel().
This commit is contained in:
@ -60,7 +60,7 @@ void createSphereInVolume(PagedVolume<uint8_t>& volData, float fRadius)
|
||||
}
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
volData.setVoxelAt(x, y, z, uVoxelValue);
|
||||
volData.setVoxel(x, y, z, uVoxelValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void createSphereInVolume(PagedVolume<uint8_t>& volData, float fRadius)
|
||||
}
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
volData.setVoxelAt(x, y, z, uVoxelValue);
|
||||
volData.setVoxel(x, y, z, uVoxelValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ void createSphereInVolume(PagedVolume<MaterialDensityPair88>& volData, float fRa
|
||||
//then we make it solid, otherwise we make it empty space.
|
||||
if(fDistToCenter <= fRadius)
|
||||
{
|
||||
volData.setVoxelAt(x,y,z, MaterialDensityPair88(uValue, uValue > 0 ? MaterialDensityPair88::getMaxDensity() : MaterialDensityPair88::getMinDensity()));
|
||||
volData.setVoxel(x,y,z, MaterialDensityPair88(uValue, uValue > 0 ? MaterialDensityPair88::getMaxDensity() : MaterialDensityPair88::getMinDensity()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,7 +66,7 @@ void createCubeInVolume(PagedVolume<MaterialDensityPair88>& volData, Vector3DInt
|
||||
{
|
||||
for (int x = lowerCorner.getX() ; x <= upperCorner.getX(); x++)
|
||||
{
|
||||
volData.setVoxelAt(x,y,z, MaterialDensityPair88(uValue, uValue > 0 ? maxDen : minDen));
|
||||
volData.setVoxel(x,y,z, MaterialDensityPair88(uValue, uValue > 0 ? maxDen : minDen));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void createSphereInVolume(PagedVolume<MaterialDensityPair44>& volData, Vector3DF
|
||||
voxel.setDensity(uDensity);
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
volData.setVoxelAt(x, y, z, voxel);
|
||||
volData.setVoxel(x, y, z, voxel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -127,7 +127,7 @@ public:
|
||||
// Voxel position within a chunk always start from zero. So if a chunk represents region (4, 8, 12) to (11, 19, 15)
|
||||
// then the valid chunk voxels are from (0, 0, 0) to (7, 11, 3). Hence we subtract the lower corner position of the
|
||||
// region from the volume space position in order to get the chunk space position.
|
||||
pChunk->setVoxelAt(x - region.getLowerX(), y - region.getLowerY(), z - region.getLowerZ(), voxel);
|
||||
pChunk->setVoxel(x - region.getLowerX(), y - region.getLowerY(), z - region.getLowerZ(), voxel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,11 +58,11 @@ void createSphereInVolume(PagedVolume<uint8_t>& volData, float fRadius)
|
||||
uint8_t uDensity = std::numeric_limits<uint8_t>::max();
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
volData.setVoxelAt(x, y, z, uDensity);
|
||||
volData.setVoxel(x, y, z, uDensity);
|
||||
}
|
||||
|
||||
//144 in the middle, (144 - 32) at the edges. Threshold of 128 is between these
|
||||
//volData.setVoxelAt(x, y, z, 144 - fDistToCenter);
|
||||
//volData.setVoxel(x, y, z, 144 - fDistToCenter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user