Work making decimated approach handle multiple resolutions.

This commit is contained in:
David Williams
2008-06-12 19:40:36 +00:00
parent 3566fc1863
commit e019c92dc2
6 changed files with 312 additions and 308 deletions

View File

@ -137,18 +137,26 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType BlockVolumeIterator<VoxelType>::getMaxedVoxel(void) const
VoxelType BlockVolumeIterator<VoxelType>::getMaxedVoxel(boost::uint8_t level) const
{
VoxelType tValue = getVoxel();
tValue = (std::max)(tValue, peekVoxel1px0py0pz());
tValue = (std::max)(tValue, peekVoxel0px1py0pz());
tValue = (std::max)(tValue, peekVoxel1px1py0pz());
tValue = (std::max)(tValue, peekVoxel0px0py1pz());
tValue = (std::max)(tValue, peekVoxel1px0py1pz());
tValue = (std::max)(tValue, peekVoxel0px1py1pz());
tValue = (std::max)(tValue, peekVoxel1px1py1pz());
return tValue;
if(level == 0)
{
return getVoxel();
}
else if(level == 1)
{
VoxelType tValue = getVoxel();
tValue = (std::max)(tValue, peekVoxel1px0py0pz());
tValue = (std::max)(tValue, peekVoxel0px1py0pz());
tValue = (std::max)(tValue, peekVoxel1px1py0pz());
tValue = (std::max)(tValue, peekVoxel0px0py1pz());
tValue = (std::max)(tValue, peekVoxel1px0py1pz());
tValue = (std::max)(tValue, peekVoxel0px1py1pz());
tValue = (std::max)(tValue, peekVoxel1px1py1pz());
return tValue;
}
assert(false);
return 0;
}
template <typename VoxelType>