Made homogeneous blocks static so they can be shared between volumes.
This commit is contained in:
parent
6d72169e11
commit
2c2f99a8e2
@ -61,7 +61,7 @@ namespace PolyVox
|
|||||||
POLYVOX_SHARED_PTR< BlockData<VoxelType> > getHomogenousBlockData(VoxelType tHomogenousValue) const;
|
POLYVOX_SHARED_PTR< BlockData<VoxelType> > getHomogenousBlockData(VoxelType tHomogenousValue) const;
|
||||||
|
|
||||||
Block<VoxelType>* m_pBlocks;
|
Block<VoxelType>* m_pBlocks;
|
||||||
mutable std::map<VoxelType, POLYVOX_WEAK_PTR< BlockData<VoxelType> > > m_pHomogenousBlockData;
|
static std::map<VoxelType, POLYVOX_WEAK_PTR< BlockData<VoxelType> > > m_pHomogenousBlockData;
|
||||||
|
|
||||||
uint32_t m_uNoOfBlocksInVolume;
|
uint32_t m_uNoOfBlocksInVolume;
|
||||||
uint16_t m_uSideLengthInBlocks;
|
uint16_t m_uSideLengthInBlocks;
|
||||||
@ -73,6 +73,10 @@ namespace PolyVox
|
|||||||
uint16_t m_uBlockSideLength;
|
uint16_t m_uBlockSideLength;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Required for the static member
|
||||||
|
template <class VoxelType> std::map<VoxelType, POLYVOX_WEAK_PTR< BlockData<VoxelType> > > Volume<VoxelType>::m_pHomogenousBlockData;
|
||||||
|
|
||||||
|
|
||||||
//Some handy typedefs
|
//Some handy typedefs
|
||||||
typedef Volume<float> FloatVolume;
|
typedef Volume<float> FloatVolume;
|
||||||
typedef Volume<uint8_t> UInt8Volume;
|
typedef Volume<uint8_t> UInt8Volume;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user