I think we have 2 different opinions on what a Region is ^^
I always thought it is minimum position until maximum position INCLUDING the maximum position (that is how the callback gets it).
but for the surface extractors you are using minimum position until maximum position minus 1.
this should be consistent, and I believe my way to be the one to get rid off, because I only messed up (and noticed therefore) in the load-callback
(and I believe I should be able to use my own code)
also for linux compilation some more includes are needed (see attachement)
no I have no further changes related to streaming.
I am using those two functions that make life easier when switching between region and voxel coordinates, maybe someone finds them useful:
Code:
template<uint32_t size, typename type>
PolyVox::Vector<size, type> operator<<(const PolyVox::Vector<size, type>& vec, type shift)
{
PolyVox::Vector<size, type> ret;
for(uint32_t i = 0; i < size; i++) {
ret.setElement(i, vec.getElement(i) << shift);
}
return ret;
}
template<uint32_t size, typename type>
PolyVox::Vector<size, type> operator>>(const PolyVox::Vector<size, type>& vec, type shift)
{
PolyVox::Vector<size, type> ret;
for(uint32_t i = 0; i < size; i++) {
ret.setElement(i, vec.getElement(i) >> shift);
}
return ret;
}