Renamed BlockVolume to Volume.
Renamed BlockVolumeIterator to VolumeIterator.
This commit is contained in:
@ -21,12 +21,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#include "PolyVoxCore/PolyVoxImpl/DecimatedSurfaceExtractor.h"
|
||||
|
||||
#include "PolyVoxCore/BlockVolume.h"
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
#include "PolyVoxCore/GradientEstimators.h"
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "PolyVoxCore/MarchingCubesTables.h"
|
||||
#include "PolyVoxCore/Region.h"
|
||||
#include "PolyVoxCore/BlockVolumeIterator.h"
|
||||
#include "PolyVoxCore/VolumeIterator.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -39,7 +39,7 @@ namespace PolyVox
|
||||
return x + (y * (POLYVOX_REGION_SIDE_LENGTH+1));
|
||||
}
|
||||
|
||||
void extractDecimatedSurfaceImpl(BlockVolume<uint8>* volumeData, uint8 uLevel, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
void extractDecimatedSurfaceImpl(Volume<uint8>* volumeData, uint8 uLevel, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
{
|
||||
singleMaterialPatch->clear();
|
||||
|
||||
@ -73,7 +73,7 @@ namespace PolyVox
|
||||
regSlice0.setUpperCorner(v3dUpperCorner);
|
||||
|
||||
//Iterator to access the volume data
|
||||
BlockVolumeIterator<uint8> volIter(*volumeData);
|
||||
VolumeIterator<uint8> volIter(*volumeData);
|
||||
|
||||
//Compute bitmask for initial slice
|
||||
uint32 uNoOfNonEmptyCellsForSlice0 = computeInitialDecimatedBitmaskForSlice(volIter, uLevel, regSlice0, offset, bitmask0);
|
||||
@ -128,7 +128,7 @@ namespace PolyVox
|
||||
}*/
|
||||
}
|
||||
|
||||
uint32 computeInitialDecimatedBitmaskForSlice(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask)
|
||||
uint32 computeInitialDecimatedBitmaskForSlice(VolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask)
|
||||
{
|
||||
const uint8 uStepSize = uLevel == 0 ? 1 : 1 << uLevel;
|
||||
uint32 uNoOfNonEmptyCells = 0;
|
||||
@ -297,7 +297,7 @@ namespace PolyVox
|
||||
return uNoOfNonEmptyCells;
|
||||
}
|
||||
|
||||
uint32 computeDecimatedBitmaskForSliceFromPrevious(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, uint8* previousBitmask)
|
||||
uint32 computeDecimatedBitmaskForSliceFromPrevious(VolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, uint8* previousBitmask)
|
||||
{
|
||||
const uint8 uStepSize = uLevel == 0 ? 1 : 1 << uLevel;
|
||||
uint32 uNoOfNonEmptyCells = 0;
|
||||
@ -423,7 +423,7 @@ namespace PolyVox
|
||||
return uNoOfNonEmptyCells;
|
||||
}
|
||||
|
||||
void generateDecimatedVerticesForSlice(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32 vertexIndicesX[],int32 vertexIndicesY[],int32 vertexIndicesZ[])
|
||||
void generateDecimatedVerticesForSlice(VolumeIterator<uint8>& volIter, uint8 uLevel, Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32 vertexIndicesX[],int32 vertexIndicesY[],int32 vertexIndicesZ[])
|
||||
{
|
||||
const uint8 uStepSize = uLevel == 0 ? 1 : 1 << uLevel;
|
||||
|
||||
@ -494,7 +494,7 @@ namespace PolyVox
|
||||
}
|
||||
}
|
||||
|
||||
void generateDecimatedIndicesForSlice(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8* bitmask0, uint8* bitmask1, int32 vertexIndicesX0[],int32 vertexIndicesY0[],int32 vertexIndicesZ0[], int32 vertexIndicesX1[],int32 vertexIndicesY1[],int32 vertexIndicesZ1[])
|
||||
void generateDecimatedIndicesForSlice(VolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8* bitmask0, uint8* bitmask1, int32 vertexIndicesX0[],int32 vertexIndicesY0[],int32 vertexIndicesZ0[], int32 vertexIndicesX1[],int32 vertexIndicesY1[],int32 vertexIndicesZ1[])
|
||||
{
|
||||
const uint8 uStepSize = uLevel == 0 ? 1 : 1 << uLevel;
|
||||
uint32 indlist[12];
|
||||
|
@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#include "PolyVoxCore/PolyVoxImpl/FastSurfaceExtractor.h"
|
||||
|
||||
#include "PolyVoxCore/BlockVolumeIterator.h"
|
||||
#include "PolyVoxCore/VolumeIterator.h"
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "PolyVoxCore/MarchingCubesTables.h"
|
||||
#include "PolyVoxCore/SurfaceVertex.h"
|
||||
@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
namespace PolyVox
|
||||
{
|
||||
|
||||
void extractFastSurfaceImpl(BlockVolume<uint8>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
void extractFastSurfaceImpl(Volume<uint8>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
{
|
||||
singleMaterialPatch->clear();
|
||||
|
||||
@ -59,7 +59,7 @@ namespace PolyVox
|
||||
regSlice0.setUpperCorner(Vector3DInt32(regSlice0.getUpperCorner().getX(),regSlice0.getUpperCorner().getY(),regSlice0.getLowerCorner().getZ()));
|
||||
|
||||
//Iterator to access the volume data
|
||||
BlockVolumeIterator<uint8> volIter(*volumeData);
|
||||
VolumeIterator<uint8> volIter(*volumeData);
|
||||
|
||||
//Compute bitmask for initial slice
|
||||
uint32 uNoOfNonEmptyCellsForSlice0 = computeInitialRoughBitmaskForSlice(volIter, regSlice0, offset, bitmask0);
|
||||
@ -110,7 +110,7 @@ namespace PolyVox
|
||||
return x + (y * (POLYVOX_REGION_SIDE_LENGTH+1));
|
||||
}
|
||||
|
||||
uint32 computeInitialRoughBitmaskForSlice(BlockVolumeIterator<uint8>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask)
|
||||
uint32 computeInitialRoughBitmaskForSlice(VolumeIterator<uint8>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask)
|
||||
{
|
||||
uint32 uNoOfNonEmptyCells = 0;
|
||||
|
||||
@ -260,7 +260,7 @@ namespace PolyVox
|
||||
return uNoOfNonEmptyCells;
|
||||
}
|
||||
|
||||
uint32 computeRoughBitmaskForSliceFromPrevious(BlockVolumeIterator<uint8>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, uint8* previousBitmask)
|
||||
uint32 computeRoughBitmaskForSliceFromPrevious(VolumeIterator<uint8>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, uint8* previousBitmask)
|
||||
{
|
||||
uint32 uNoOfNonEmptyCells = 0;
|
||||
|
||||
@ -376,7 +376,7 @@ namespace PolyVox
|
||||
return uNoOfNonEmptyCells;
|
||||
}
|
||||
|
||||
void generateRoughVerticesForSlice(BlockVolumeIterator<uint8>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32 vertexIndicesX[],int32 vertexIndicesY[],int32 vertexIndicesZ[])
|
||||
void generateRoughVerticesForSlice(VolumeIterator<uint8>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32 vertexIndicesX[],int32 vertexIndicesY[],int32 vertexIndicesZ[])
|
||||
{
|
||||
//Iterate over each cell in the region
|
||||
volIter.setPosition(regSlice.getLowerCorner().getX(),regSlice.getLowerCorner().getY(), regSlice.getLowerCorner().getZ());
|
||||
@ -443,7 +443,7 @@ namespace PolyVox
|
||||
}while(volIter.moveForwardInRegionXYZ());//For each cell
|
||||
}
|
||||
|
||||
void generateRoughIndicesForSlice(BlockVolumeIterator<uint8>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8* bitmask0, uint8* bitmask1, int32 vertexIndicesX0[],int32 vertexIndicesY0[],int32 vertexIndicesZ0[], int32 vertexIndicesX1[],int32 vertexIndicesY1[],int32 vertexIndicesZ1[])
|
||||
void generateRoughIndicesForSlice(VolumeIterator<uint8>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8* bitmask0, uint8* bitmask1, int32 vertexIndicesX0[],int32 vertexIndicesY0[],int32 vertexIndicesZ0[], int32 vertexIndicesX1[],int32 vertexIndicesY1[],int32 vertexIndicesZ1[])
|
||||
{
|
||||
uint32 indlist[12];
|
||||
|
||||
|
@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#include "PolyVoxCore/PolyVoxImpl/ReferenceSurfaceExtractor.h"
|
||||
|
||||
#include "PolyVoxCore/BlockVolume.h"
|
||||
#include "PolyVoxCore/BlockVolumeIterator.h"
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
#include "PolyVoxCore/VolumeIterator.h"
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "PolyVoxCore/MarchingCubesTables.h"
|
||||
#include "PolyVoxCore/Region.h"
|
||||
@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
void extractReferenceSurfaceImpl(BlockVolume<uint8>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
void extractReferenceSurfaceImpl(Volume<uint8>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch)
|
||||
{
|
||||
static int32 vertexIndicesX[POLYVOX_REGION_SIDE_LENGTH+1][POLYVOX_REGION_SIDE_LENGTH+1][POLYVOX_REGION_SIDE_LENGTH+1];
|
||||
static int32 vertexIndicesY[POLYVOX_REGION_SIDE_LENGTH+1][POLYVOX_REGION_SIDE_LENGTH+1][POLYVOX_REGION_SIDE_LENGTH+1];
|
||||
@ -54,7 +54,7 @@ namespace PolyVox
|
||||
Vector3DFloat vertlist[12];
|
||||
Vector3DFloat normlist[12];
|
||||
uint8 vertMaterials[12];
|
||||
BlockVolumeIterator<uint8> volIter(*volumeData);
|
||||
VolumeIterator<uint8> volIter(*volumeData);
|
||||
volIter.setValidRegion(region);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user