Applied patch from ker such that int32_t's are now used instead of uint16_t's for addressing voxel positions.
This commit is contained in:
@ -49,9 +49,9 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
Vector3DFloat computeDecimatedCentralDifferenceGradient(const VolumeSampler<VoxelType>& volIter)
|
||||
{
|
||||
const uint16_t x = volIter.getPosX();
|
||||
const uint16_t y = volIter.getPosY();
|
||||
const uint16_t z = volIter.getPosZ();
|
||||
const int32_t x = volIter.getPosX();
|
||||
const int32_t y = volIter.getPosY();
|
||||
const int32_t z = volIter.getPosZ();
|
||||
|
||||
//FIXME - bitwise way of doing this?
|
||||
VoxelType voxel1nx = volIter.getVoxelAt(x-2, y ,z ) > 0 ? 1: 0;
|
||||
@ -74,9 +74,9 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
Vector3DFloat computeSmoothCentralDifferenceGradient(VolumeSampler<VoxelType>& volIter)
|
||||
{
|
||||
uint16_t initialX = volIter.getPosX();
|
||||
uint16_t initialY = volIter.getPosY();
|
||||
uint16_t initialZ = volIter.getPosZ();
|
||||
int32_t initialX = volIter.getPosX();
|
||||
int32_t initialY = volIter.getPosY();
|
||||
int32_t initialZ = volIter.getPosZ();
|
||||
|
||||
//FIXME - bitwise way of doing this?
|
||||
volIter.setPosition(initialX-1, initialY, initialZ);
|
||||
@ -191,9 +191,9 @@ namespace PolyVox
|
||||
static const int weights[3][3][3] = { { {2,3,2}, {3,6,3}, {2,3,2} }, {
|
||||
{3,6,3}, {6,0,6}, {3,6,3} }, { {2,3,2}, {3,6,3}, {2,3,2} } };
|
||||
|
||||
uint16_t initialX = volIter.getPosX();
|
||||
uint16_t initialY = volIter.getPosY();
|
||||
uint16_t initialZ = volIter.getPosZ();
|
||||
int32_t initialX = volIter.getPosX();
|
||||
int32_t initialY = volIter.getPosY();
|
||||
int32_t initialZ = volIter.getPosZ();
|
||||
|
||||
volIter.setPosition(initialX-1, initialY-1, initialZ-1); const float pVoxel1nx1ny1nz = computeSmoothedVoxel(volIter);
|
||||
volIter.setPosition(initialX-1, initialY-1, initialZ ); const float pVoxel1nx1ny0pz = computeSmoothedVoxel(volIter);
|
||||
|
Reference in New Issue
Block a user