Small volume fixes.
This commit is contained in:
@ -146,7 +146,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
void BlockData<VoxelType>::fill(VoxelType tValue)
|
||||
{
|
||||
memset(m_tData, tValue, m_uSideLength * m_uSideLength * m_uSideLength * sizeof(VoxelType));
|
||||
memset(m_tData, (int)tValue, m_uSideLength * m_uSideLength * m_uSideLength * sizeof(VoxelType));
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -40,6 +40,16 @@ namespace PolyVox
|
||||
:m_pBlocks(0)
|
||||
,m_uCurrentBlockForTidying(0)
|
||||
{
|
||||
//A values of zero for a block side length is a special value to indicate that the block
|
||||
//side length should simply be made as large as possible. This can be useful if you are
|
||||
//creating only a small volume which doesn't need to be broken down into many blocks. This
|
||||
//'largest possible block size' will be equal to the shortest volume dimension, as a volume
|
||||
//dimension can never be less than a block side length.
|
||||
if(uBlockSideLength == 0)
|
||||
{
|
||||
uBlockSideLength = (std::min)((std::min)(uWidth,uHeight),uDepth);
|
||||
}
|
||||
|
||||
//Debug mode validation
|
||||
assert(isPowerOf2(uWidth));
|
||||
assert(isPowerOf2(uHeight));
|
||||
|
Reference in New Issue
Block a user