From 2c2f99a8e29f29ba041dea986de52df9ab8ea30a Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 9 Apr 2009 21:27:28 +0000 Subject: [PATCH] Made homogeneous blocks static so they can be shared between volumes. --- library/PolyVoxCore/include/Volume.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/PolyVoxCore/include/Volume.h b/library/PolyVoxCore/include/Volume.h index f6e566d4..cb5371ff 100644 --- a/library/PolyVoxCore/include/Volume.h +++ b/library/PolyVoxCore/include/Volume.h @@ -61,7 +61,7 @@ namespace PolyVox POLYVOX_SHARED_PTR< BlockData > getHomogenousBlockData(VoxelType tHomogenousValue) const; Block* m_pBlocks; - mutable std::map > > m_pHomogenousBlockData; + static std::map > > m_pHomogenousBlockData; uint32_t m_uNoOfBlocksInVolume; uint16_t m_uSideLengthInBlocks; @@ -73,6 +73,10 @@ namespace PolyVox uint16_t m_uBlockSideLength; }; + //Required for the static member + template std::map > > Volume::m_pHomogenousBlockData; + + //Some handy typedefs typedef Volume FloatVolume; typedef Volume UInt8Volume;