More work on multiresolution mesh generation. Nearly there...
This commit is contained in:
parent
eed6d56cb6
commit
0751ff2fad
@ -29,7 +29,7 @@ namespace PolyVox
|
||||
regionGeometry.m_patchSingleMaterial = new IndexedSurfacePatch(false);
|
||||
regionGeometry.m_v3dRegionPosition = iterChangedRegions->getLowerCorner();
|
||||
|
||||
generateDecimatedMeshDataForRegion(volume.getVolumeData(), 0, *iterChangedRegions, regionGeometry.m_patchSingleMaterial);
|
||||
generateDecimatedMeshDataForRegion(volume.getVolumeData(), 1, *iterChangedRegions, regionGeometry.m_patchSingleMaterial);
|
||||
|
||||
//genMultiFromSingle(regionGeometry.m_patchSingleMaterial, regionGeometry.m_patchMultiMaterial);
|
||||
|
||||
|
@ -65,7 +65,7 @@ namespace PolyVox
|
||||
generateDecimatedVerticesForSlice(volIter, uLevel, regSlice0, offset, bitmask0, singleMaterialPatch, vertexIndicesX0, vertexIndicesY0, vertexIndicesZ0);
|
||||
}
|
||||
|
||||
for(boost::uint32_t uSlice = 0; ((uSlice <= POLYVOX_REGION_SIDE_LENGTH-1) && (uSlice + offset.getZ() < region.getUpperCorner().getZ())); uSlice += uStepSize)
|
||||
for(boost::uint32_t uSlice = 1; ((uSlice <= POLYVOX_REGION_SIDE_LENGTH) && (uSlice + offset.getZ() <= regVolume.getUpperCorner().getZ())); uSlice += uStepSize)
|
||||
{
|
||||
Region regSlice1(regSlice0);
|
||||
regSlice1.shift(Vector3DInt32(0,0,uStepSize));
|
||||
|
@ -64,7 +64,7 @@ namespace PolyVox
|
||||
listToFill.clear();
|
||||
|
||||
//Regenerate meshes.
|
||||
for(uint16_t regionZ = 0; regionZ < POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS; ++regionZ)
|
||||
for(uint16_t regionZ = 0; regionZ < POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS-1; ++regionZ)
|
||||
//for(uint16_t regionZ = 0; regionZ < 1; ++regionZ)
|
||||
{
|
||||
for(uint16_t regionY = 0; regionY < POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS; ++regionY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user