From 4658e8026ea791fc17aa77fed091aad38b8733b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Feb 2012 10:57:53 +0100 Subject: [PATCH] Renamed 'resize' to 'initialise' and made it private. --- library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h | 5 ++--- library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl | 6 +++--- library/PolyVoxCore/include/PolyVoxCore/RawVolume.h | 5 ++--- library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl | 4 ++-- library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h | 5 ++--- library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl | 4 ++-- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h index 9399f669..40bfd437 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h @@ -299,10 +299,9 @@ namespace PolyVox /// Calculates approximatly how many bytes of memory the volume is currently using. uint32_t calculateSizeInBytes(void); - /// Deprecated - I don't think we should expose this function? Let us know if you disagree... - void resize(const Region& regValidRegion, uint16_t uBlockSideLength); - private: + void initialise(const Region& regValidRegion, uint16_t uBlockSideLength); + /// gets called when a new region is allocated and needs to be filled /// NOTE: accessing ANY voxels outside this region during the process of this function /// is absolutely unsafe diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl index d5ae0004..9fda97f4 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl @@ -45,7 +45,7 @@ namespace PolyVox m_funcDataOverflowHandler = dataOverflowHandler; m_bPagingEnabled = true; //Create a volume of the right size. - resize(Region::MaxRegion,uBlockSideLength); + initialise(Region::MaxRegion,uBlockSideLength); } //////////////////////////////////////////////////////////////////////////////// @@ -93,7 +93,7 @@ namespace PolyVox m_bPagingEnabled = bPagingEnabled; //Create a volume of the right size. - resize(regValid,uBlockSideLength); + initialise(regValid,uBlockSideLength); } //////////////////////////////////////////////////////////////////////////////// @@ -391,7 +391,7 @@ namespace PolyVox /// This function should probably be made internal... //////////////////////////////////////////////////////////////////////////////// template - void LargeVolume::resize(const Region& regValidRegion, uint16_t uBlockSideLength) + void LargeVolume::initialise(const Region& regValidRegion, uint16_t uBlockSideLength) { //Debug mode validation assert(uBlockSideLength > 0); diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h index 3bef1a8a..87be81d4 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h @@ -144,10 +144,9 @@ namespace PolyVox /// Calculates approximatly how many bytes of memory the volume is currently using. uint32_t calculateSizeInBytes(void); - /// Deprecated - I don't think we should expose this function? Let us know if you disagree... - void resize(const Region& regValidRegion); +private: + void initialise(const Region& regValidRegion); -private: //The block data VoxelType* m_pData; diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl index c46cba6b..b6fe2220 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl @@ -37,7 +37,7 @@ namespace PolyVox setBorderValue(VoxelType()); //Create a volume of the right size. - resize(regValid); + initialise(regValid); } //////////////////////////////////////////////////////////////////////////////// @@ -157,7 +157,7 @@ namespace PolyVox /// This function should probably be made internal... //////////////////////////////////////////////////////////////////////////////// template - void RawVolume::resize(const Region& regValidRegion) + void RawVolume::initialise(const Region& regValidRegion) { this->m_regValidRegion = regValidRegion; diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h index 447f0f18..57c18647 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h @@ -173,10 +173,9 @@ namespace PolyVox /// Calculates approximatly how many bytes of memory the volume is currently using. uint32_t calculateSizeInBytes(void); - /// Deprecated - I don't think we should expose this function? Let us know if you disagree... - void resize(const Region& regValidRegion, uint16_t uBlockSideLength); - private: + void initialise(const Region& regValidRegion, uint16_t uBlockSideLength); + Block* getUncompressedBlock(int32_t uBlockX, int32_t uBlockY, int32_t uBlockZ) const; //The block data diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl index 14bed170..00dc92d5 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl @@ -57,7 +57,7 @@ namespace PolyVox :BaseVolume(regValid) { //Create a volume of the right size. - resize(regValid,uBlockSideLength); + initialise(regValid,uBlockSideLength); } //////////////////////////////////////////////////////////////////////////////// @@ -174,7 +174,7 @@ namespace PolyVox /// This function should probably be made internal... //////////////////////////////////////////////////////////////////////////////// template - void SimpleVolume::resize(const Region& regValidRegion, uint16_t uBlockSideLength) + void SimpleVolume::initialise(const Region& regValidRegion, uint16_t uBlockSideLength) { //Debug mode validation assert(uBlockSideLength > 0);