Removed homogeneous value from Block class.

This commit is contained in:
David Williams
2009-04-09 22:04:17 +00:00
parent 2c2f99a8e2
commit 3a9c42576c
3 changed files with 20 additions and 17 deletions

View File

@ -34,7 +34,6 @@ namespace PolyVox
{
public:
POLYVOX_SHARED_PTR< BlockData<VoxelType> > m_pBlockData;
VoxelType m_pHomogenousValue;
bool m_bIsShared;
bool m_bIsPotentiallySharable;
};

View File

@ -77,9 +77,14 @@ namespace PolyVox
return *this;
}
//If this fails an exception will be thrown. Memory is not
//allocated and there is nothing else in this class to clean up
m_tData = new VoxelType[rhs.m_uSideLength * rhs.m_uSideLength * rhs.m_uSideLength];
//Copy the data
m_uSideLength = rhs.m_uSideLength;
m_uSideLengthPower = rhs.m_uSideLengthPower;
memcpy(m_tData, rhs.m_tData, m_uSideLength * m_uSideLength * m_uSideLength);
m_uSideLengthPower = rhs.m_uSideLengthPower;
memcpy(m_tData, rhs.m_tData, m_uSideLength * m_uSideLength * m_uSideLength * sizeof(VoxelType));
return *this;
}