From b19de819e221fb1212558363a5e1bc77c1251737 Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 14 May 2015 11:27:19 +0200 Subject: [PATCH 1/2] Fixed compile error due to logging code changing scope. --- include/PolyVox/Impl/Assertions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PolyVox/Impl/Assertions.h b/include/PolyVox/Impl/Assertions.h index d33669a5..a6bc486e 100644 --- a/include/PolyVox/Impl/Assertions.h +++ b/include/PolyVox/Impl/Assertions.h @@ -53,7 +53,7 @@ distribution. ss << " Message: " << (message); \ ss << " Location: " << "Line " << __LINE__ << " of " << __FILE__; \ ss << "\n"; \ - PolyVox::Impl::getLoggerInstance()->logFatalMessage(ss.str()); \ + PolyVox::getLoggerInstance()->logFatalMessage(ss.str()); \ POLYVOX_HALT(); \ } \ } while(0) \ From 304e3d8f7a88e1c2899767a5478294daed9398ea Mon Sep 17 00:00:00 2001 From: David Williams Date: Sat, 23 May 2015 21:22:29 +0200 Subject: [PATCH 2/2] Faster tests when moving sampler. --- include/PolyVox/PagedVolumeSampler.inl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/PolyVox/PagedVolumeSampler.inl b/include/PolyVox/PagedVolumeSampler.inl index 5b3473ff..8a1f7a83 100644 --- a/include/PolyVox/PagedVolumeSampler.inl +++ b/include/PolyVox/PagedVolumeSampler.inl @@ -144,7 +144,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::movePositiveX(); // Then we update the voxel pointer - if(((this->mXPosInVolume) % this->mVolume->m_uChunkSideLength != 0)) + if(CAN_GO_POS_X(this->m_uXPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += POS_X_DELTA; @@ -164,7 +164,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::movePositiveY(); // Then we update the voxel pointer - if(((this->mYPosInVolume) % this->mVolume->m_uChunkSideLength != 0)) + if (CAN_GO_POS_Y(this->m_uYPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += POS_Y_DELTA; @@ -184,7 +184,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::movePositiveZ(); // Then we update the voxel pointer - if(((this->mZPosInVolume) % this->mVolume->m_uChunkSideLength != 0)) + if (CAN_GO_POS_Z(this->m_uZPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += POS_Z_DELTA; @@ -204,7 +204,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::moveNegativeX(); // Then we update the voxel pointer - if(((this->mXPosInVolume + 1) % this->mVolume->m_uChunkSideLength != 0)) + if (CAN_GO_NEG_X(this->m_uXPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += NEG_X_DELTA; @@ -224,7 +224,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::moveNegativeY(); // Then we update the voxel pointer - if(((this->mYPosInVolume + 1) % this->mVolume->m_uChunkSideLength != 0)) + if (CAN_GO_NEG_Y(this->m_uYPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += NEG_Y_DELTA; @@ -244,7 +244,7 @@ namespace PolyVox BaseVolume::template Sampler< PagedVolume >::moveNegativeZ(); // Then we update the voxel pointer - if(((this->mZPosInVolume + 1) % this->mVolume->m_uChunkSideLength != 0)) + if (CAN_GO_NEG_Z(this->m_uZPosInChunk)) { //No need to compute new chunk. mCurrentVoxel += NEG_Z_DELTA;