Merge branch 'develop' into feature/vertex-refactor

Conflicts:
	library/PolyVoxCore/include/PolyVoxCore/DefaultIsQuadNeeded.h
	library/PolyVoxCore/include/PolyVoxCore/MarchingCubesSurfaceExtractor.inl
	library/PolyVoxCore/source/VertexTypes.cpp
This commit is contained in:
David Williams 2014-05-11 20:45:31 +02:00
commit d69e840055
3 changed files with 11 additions and 10 deletions

View File

@ -33,12 +33,12 @@ namespace PolyVox
template<typename VoxelType>
class DefaultIsQuadNeeded
{
public:
public:
bool operator()(VoxelType back, VoxelType front, VoxelType& materialToUse)
{
if((back > 0) && (front == 0))
{
materialToUse = static_cast<VoxelType>(back);
materialToUse = static_cast<VoxelType>(back);
return true;
}
else

View File

@ -25,8 +25,8 @@ freely, subject to the following restrictions:
namespace PolyVox
{
template<typename VolumeType, typename Controller>
MarchingCubesSurfaceExtractor<VolumeType, Controller>::MarchingCubesSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<MarchingCubesVertex<typename VolumeType::VoxelType> >* result, WrapMode eWrapMode, typename VolumeType::VoxelType tBorderValue, Controller controller)
template<typename VolumeType, typename Controller>
MarchingCubesSurfaceExtractor<VolumeType, Controller>::MarchingCubesSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<MarchingCubesVertex<typename VolumeType::VoxelType> >* result, WrapMode eWrapMode, typename VolumeType::VoxelType tBorderValue, Controller controller)
:m_volData(volData)
,m_sampVolume(volData)
,m_meshCurrent(result)
@ -456,10 +456,10 @@ namespace PolyVox
v3dNormal.normalise();
}
// Allow the controller to decide how the material should be derived from the voxels.
// Allow the controller to decide how the material should be derived from the voxels.
const typename VolumeType::VoxelType uMaterial = m_controller.blendMaterials(v000, v100, fInterp);
const MarchingCubesVertex<typename VolumeType::VoxelType> surfaceVertex(v3dPosition, v3dNormal, uMaterial);
const MarchingCubesVertex<typename VolumeType::VoxelType> surfaceVertex(v3dPosition, v3dNormal, uMaterial);
const uint32_t uLastVertexIndex = m_meshCurrent->addVertex(surfaceVertex);
m_pCurrentVertexIndicesX[iXVolSpace - m_regSizeInVoxels.getLowerX()][iYVolSpace - m_regSizeInVoxels.getLowerY()] = uLastVertexIndex;
@ -485,11 +485,11 @@ namespace PolyVox
v3dNormal.normalise();
}
// Allow the controller to decide how the material should be derived from the voxels.
// Allow the controller to decide how the material should be derived from the voxels.
const typename VolumeType::VoxelType uMaterial = m_controller.blendMaterials(v000, v010, fInterp);
MarchingCubesVertex<typename VolumeType::VoxelType> surfaceVertex(v3dPosition, v3dNormal, uMaterial);
uint32_t uLastVertexIndex = m_meshCurrent->addVertex(surfaceVertex);
uint32_t uLastVertexIndex = m_meshCurrent->addVertex(surfaceVertex);
m_pCurrentVertexIndicesY[iXVolSpace - m_regSizeInVoxels.getLowerX()][iYVolSpace - m_regSizeInVoxels.getLowerY()] = uLastVertexIndex;
m_sampVolume.moveNegativeY();
@ -513,10 +513,10 @@ namespace PolyVox
v3dNormal.normalise();
}
// Allow the controller to decide how the material should be derived from the voxels.
// Allow the controller to decide how the material should be derived from the voxels.
const typename VolumeType::VoxelType uMaterial = m_controller.blendMaterials(v000, v001, fInterp);
const MarchingCubesVertex<typename VolumeType::VoxelType> surfaceVertex(v3dPosition, v3dNormal, uMaterial);
const MarchingCubesVertex<typename VolumeType::VoxelType> surfaceVertex(v3dPosition, v3dNormal, uMaterial);
const uint32_t uLastVertexIndex = m_meshCurrent->addVertex(surfaceVertex);
m_pCurrentVertexIndicesZ[iXVolSpace - m_regSizeInVoxels.getLowerX()][iYVolSpace - m_regSizeInVoxels.getLowerY()] = uLastVertexIndex;

View File

@ -0,0 +1 @@