Mostly removed use of VoxelTypeTraits. It's a bit messy because I'm committing halfway through, as I'm away fro my development machine for the next week and want to pick this up from my laptop.
SurfaceExtractor test is currently broken due to custom threshold support not curretly working.
This commit is contained in:
parent
f092d64992
commit
777b631f88
@ -48,7 +48,7 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, float fRa
|
|||||||
//then we make it solid, otherwise we make it empty space.
|
//then we make it solid, otherwise we make it empty space.
|
||||||
if(fDistToCenter <= fRadius)
|
if(fDistToCenter <= fRadius)
|
||||||
{
|
{
|
||||||
volData.setVoxelAt(x,y,z, MaterialDensityPair44(uValue, uValue > 0 ? VoxelTypeTraits<MaterialDensityPair44>::maxDensity() : VoxelTypeTraits<MaterialDensityPair44>::minDensity()));
|
volData.setVoxelAt(x,y,z, MaterialDensityPair44(uValue, uValue > 0 ? MaterialDensityPair44::getMaxDensity() : MaterialDensityPair44::getMinDensity()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,8 +57,8 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, float fRa
|
|||||||
|
|
||||||
void createCubeInVolume(LargeVolume<MaterialDensityPair44>& volData, Vector3DInt32 lowerCorner, Vector3DInt32 upperCorner, uint8_t uValue)
|
void createCubeInVolume(LargeVolume<MaterialDensityPair44>& volData, Vector3DInt32 lowerCorner, Vector3DInt32 upperCorner, uint8_t uValue)
|
||||||
{
|
{
|
||||||
int maxDen = VoxelTypeTraits<MaterialDensityPair44>::maxDensity();
|
int maxDen = MaterialDensityPair44::getMaxDensity();
|
||||||
int minDen = VoxelTypeTraits<MaterialDensityPair44>::minDensity();
|
int minDen = MaterialDensityPair44::getMinDensity();
|
||||||
//This three-level for loop iterates over every voxel between the specified corners
|
//This three-level for loop iterates over every voxel between the specified corners
|
||||||
for (int z = lowerCorner.getZ(); z <= upperCorner.getZ(); z++)
|
for (int z = lowerCorner.getZ(); z <= upperCorner.getZ(); z++)
|
||||||
{
|
{
|
||||||
|
@ -97,9 +97,9 @@ int main(int argc, char *argv[])
|
|||||||
createCubeInVolume(volData, Vector3DInt32(midPos+1, minPos, midPos+1), Vector3DInt32(maxPos, midPos-1, maxPos), 0);
|
createCubeInVolume(volData, Vector3DInt32(midPos+1, minPos, midPos+1), Vector3DInt32(maxPos, midPos-1, maxPos), 0);
|
||||||
createCubeInVolume(volData, Vector3DInt32(minPos, midPos+1, midPos+1), Vector3DInt32(midPos-1, maxPos, maxPos), 0);
|
createCubeInVolume(volData, Vector3DInt32(minPos, midPos+1, midPos+1), Vector3DInt32(midPos-1, maxPos, maxPos), 0);
|
||||||
|
|
||||||
createCubeInVolume(volData, Vector3DInt32(1, midPos-10, midPos-10), Vector3DInt32(maxPos-1, midPos+10, midPos+10), VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
createCubeInVolume(volData, Vector3DInt32(1, midPos-10, midPos-10), Vector3DInt32(maxPos-1, midPos+10, midPos+10), MaterialDensityPair44::getMaxDensity());
|
||||||
createCubeInVolume(volData, Vector3DInt32(midPos-10, 1, midPos-10), Vector3DInt32(midPos+10, maxPos-1, midPos+10), VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
createCubeInVolume(volData, Vector3DInt32(midPos-10, 1, midPos-10), Vector3DInt32(midPos+10, maxPos-1, midPos+10), MaterialDensityPair44::getMaxDensity());
|
||||||
createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity());
|
||||||
|
|
||||||
//Smooth part of the volume
|
//Smooth part of the volume
|
||||||
RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128));
|
RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128));
|
||||||
|
@ -50,7 +50,7 @@ void createPerlinVolumeSlow(LargeVolume<MaterialDensityPair44>& volData)
|
|||||||
|
|
||||||
perlinVal += 1.0f;
|
perlinVal += 1.0f;
|
||||||
perlinVal *= 0.5f;
|
perlinVal *= 0.5f;
|
||||||
perlinVal *= VoxelTypeTraits<MaterialDensityPair44>::maxDensity();
|
perlinVal *= MaterialDensityPair44::getMaxDensity();
|
||||||
|
|
||||||
MaterialDensityPair44 voxel;
|
MaterialDensityPair44 voxel;
|
||||||
|
|
||||||
@ -60,12 +60,12 @@ void createPerlinVolumeSlow(LargeVolume<MaterialDensityPair44>& volData)
|
|||||||
/*if(perlinVal < 0.0f)
|
/*if(perlinVal < 0.0f)
|
||||||
{
|
{
|
||||||
voxel.setMaterial(245);
|
voxel.setMaterial(245);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
voxel.setDensity(MaterialDensityPair44::getMaxDensity());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voxel.setMaterial(0);
|
voxel.setMaterial(0);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::minDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
volData.setVoxelAt(x, y, z, voxel);
|
volData.setVoxelAt(x, y, z, voxel);
|
||||||
@ -105,12 +105,12 @@ void createPerlinVolumeSlow(LargeVolume<MaterialDensityPair44>& volData)
|
|||||||
if(perlinVal < 0.0f)
|
if(perlinVal < 0.0f)
|
||||||
{
|
{
|
||||||
voxel.setMaterial(245);
|
voxel.setMaterial(245);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
voxel.setDensity(MaterialDensityPair44::getMaxDensity());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voxel.setMaterial(0);
|
voxel.setMaterial(0);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::minDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
}
|
}
|
||||||
|
|
||||||
volData.setVoxelAt(x, y, z, voxel);
|
volData.setVoxelAt(x, y, z, voxel);
|
||||||
@ -143,12 +143,12 @@ void createPerlinTerrain(LargeVolume<MaterialDensityPair44>& volData)
|
|||||||
if(z < perlinVal)
|
if(z < perlinVal)
|
||||||
{
|
{
|
||||||
voxel.setMaterial(245);
|
voxel.setMaterial(245);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
voxel.setDensity(MaterialDensityPair44::getMaxDensity());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voxel.setMaterial(0);
|
voxel.setMaterial(0);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::minDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
}
|
}
|
||||||
|
|
||||||
volData.setVoxelAt(x, y, z, voxel);
|
volData.setVoxelAt(x, y, z, voxel);
|
||||||
@ -181,7 +181,7 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, Vector3DF
|
|||||||
if(fDistToCenter <= fRadius)
|
if(fDistToCenter <= fRadius)
|
||||||
{
|
{
|
||||||
//Our new density value
|
//Our new density value
|
||||||
uint8_t uDensity = VoxelTypeTraits<MaterialDensityPair44>::maxDensity();
|
uint8_t uDensity = MaterialDensityPair44::getMaxDensity();
|
||||||
|
|
||||||
//Get the old voxel
|
//Get the old voxel
|
||||||
MaterialDensityPair44 voxel = volData.getVoxelAt(x,y,z);
|
MaterialDensityPair44 voxel = volData.getVoxelAt(x,y,z);
|
||||||
@ -219,17 +219,17 @@ void load(const ConstVolumeProxy<MaterialDensityPair44>& volume, const PolyVox::
|
|||||||
if((x-xpos)*(x-xpos) + (z-zpos)*(z-zpos) < 200) {
|
if((x-xpos)*(x-xpos) + (z-zpos)*(z-zpos) < 200) {
|
||||||
// tunnel
|
// tunnel
|
||||||
voxel.setMaterial(0);
|
voxel.setMaterial(0);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::minDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
} else {
|
} else {
|
||||||
// solid
|
// solid
|
||||||
voxel.setMaterial(245);
|
voxel.setMaterial(245);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::maxDensity());
|
voxel.setDensity(MaterialDensityPair44::getMaxDensity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voxel.setMaterial(0);
|
voxel.setMaterial(0);
|
||||||
voxel.setDensity(VoxelTypeTraits<MaterialDensityPair44>::minDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
}
|
}
|
||||||
|
|
||||||
volume.setVoxelAt(x, y, z, voxel);
|
volume.setVoxelAt(x, y, z, voxel);
|
||||||
|
@ -56,7 +56,7 @@ void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
|
|||||||
{
|
{
|
||||||
//Our new density value
|
//Our new density value
|
||||||
//uint8_t uDensity = Density8::getmaxDensity()();
|
//uint8_t uDensity = Density8::getmaxDensity()();
|
||||||
uint8_t uDensity = VoxelTypeTraits<Density8>::maxDensity();
|
uint8_t uDensity = std::numeric_limits<uint8_t>::max();
|
||||||
|
|
||||||
//Get the old voxel
|
//Get the old voxel
|
||||||
//uint8_t voxel = volData.getVoxelAt(x,y,z);
|
//uint8_t voxel = volData.getVoxelAt(x,y,z);
|
||||||
|
@ -89,14 +89,10 @@ namespace PolyVox
|
|||||||
}
|
}
|
||||||
|
|
||||||
DensityType getDensity() const throw() { return m_uDensity; }
|
DensityType getDensity() const throw() { return m_uDensity; }
|
||||||
//MaterialType getMaterial() const throw() { return 1; }
|
|
||||||
|
|
||||||
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
||||||
//void setMaterial(MaterialType /*uMaterial*/) { assert(false); } //Cannot set material on voxel of type Density
|
|
||||||
|
|
||||||
//static DensityType getmaxDensity()() throw() { return (std::numeric_limits<DensityType>::max)(); }
|
static DensityType getMaxDensity() throw() { return (std::numeric_limits<DensityType>::max)(); }
|
||||||
//static DensityType getminDensity()() throw() { return (std::numeric_limits<DensityType>::min)(); }
|
static DensityType getMinDensity() throw() { return (std::numeric_limits<DensityType>::min)(); }
|
||||||
static DensityType getThreshold() throw() { return (std::numeric_limits<DensityType>::max)() / 2; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DensityType m_uDensity;
|
DensityType m_uDensity;
|
||||||
@ -132,15 +128,13 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DensityType getThreshold(void)
|
||||||
|
{
|
||||||
|
// Returns a threshold value halfway between the min and max possible values.
|
||||||
|
return (Density<Type>::getMinDensity() + Density<Type>::getMaxDensity()) / 2;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "PolyVoxCore/SurfaceExtractor.h" //VERY UGLY THAT WE NEED THIS!!! TO BE CONSIDERED...
|
|
||||||
|
|
||||||
namespace PolyVox
|
|
||||||
{
|
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<Density8>::DensityType convertToDensity(Density8 voxel);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //__PolyVox_Density_H__
|
#endif //__PolyVox_Density_H__
|
||||||
|
@ -72,30 +72,9 @@ namespace PolyVox
|
|||||||
return !(*this == rhs);
|
return !(*this == rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DensityType getDensity() const throw()
|
|
||||||
{
|
|
||||||
//We don't actually have a density, so make one up based on the material.
|
|
||||||
if(m_uMaterial == 0)
|
|
||||||
{
|
|
||||||
//return getminDensity()();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//return getmaxDensity()();
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialType getMaterial() const throw() { return m_uMaterial; }
|
MaterialType getMaterial() const throw() { return m_uMaterial; }
|
||||||
|
|
||||||
void setDensity(DensityType /*uDensity*/) { assert(false); } //Cannot set density on voxel of type Material
|
|
||||||
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
||||||
|
|
||||||
//static DensityType getmaxDensity()() throw() { return 2; }
|
|
||||||
//static DensityType getminDensity()() throw() { return 0; }
|
|
||||||
static DensityType getThreshold() throw() { return 1; }
|
|
||||||
|
|
||||||
static bool isQuadNeeded(Material<Type> from, Material<Type> to, float& materialToUse)
|
static bool isQuadNeeded(Material<Type> from, Material<Type> to, float& materialToUse)
|
||||||
{
|
{
|
||||||
if((from.getMaterial() > 0) && (to.getMaterial() == 0))
|
if((from.getMaterial() > 0) && (to.getMaterial() == 0))
|
||||||
|
@ -93,9 +93,8 @@ namespace PolyVox
|
|||||||
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
||||||
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
||||||
|
|
||||||
//static DensityType getmaxDensity()() throw() { return (0x01 << NoOfDensityBits) - 1; }
|
static DensityType getMaxDensity() throw() { return (0x01 << NoOfDensityBits) - 1; }
|
||||||
//static DensityType getminDensity()() throw() { return 0; }
|
static DensityType getMinDensity() throw() { return 0; }
|
||||||
static DensityType getThreshold() throw() {return 0x01 << (NoOfDensityBits - 1);}
|
|
||||||
|
|
||||||
static bool isQuadNeeded(MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> from, MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> to, float& materialToUse)
|
static bool isQuadNeeded(MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> from, MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> to, float& materialToUse)
|
||||||
{
|
{
|
||||||
@ -131,6 +130,12 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return voxel.getMaterial();
|
return voxel.getMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DensityType getThreshold(void)
|
||||||
|
{
|
||||||
|
// Returns a threshold value halfway between the min and max possible values.
|
||||||
|
return (MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits>::getMinDensity() + MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits>::getMaxDensity()) / 2;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef MaterialDensityPair<uint8_t, 4, 4> MaterialDensityPair44;
|
typedef MaterialDensityPair<uint8_t, 4, 4> MaterialDensityPair44;
|
||||||
@ -157,33 +162,4 @@ namespace PolyVox
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "PolyVoxCore/SurfaceExtractor.h"
|
|
||||||
|
|
||||||
namespace PolyVox
|
|
||||||
{
|
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<MaterialDensityPair44>::DensityType convertToDensity(MaterialDensityPair44 voxel);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<MaterialDensityPair88>::DensityType convertToDensity(MaterialDensityPair88 voxel);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
class ConvertToMaterial<MaterialDensityPair44>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef uint32_t MaterialType;
|
|
||||||
|
|
||||||
MaterialType operator()(MaterialDensityPair44 voxel);
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
class ConvertToMaterial<MaterialDensityPair88>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef uint32_t MaterialType;
|
|
||||||
|
|
||||||
MaterialType operator()(MaterialDensityPair88 voxel);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,8 @@ freely, subject to the following restrictions:
|
|||||||
#ifndef __PolyVox_SurfaceExtractionController_H__
|
#ifndef __PolyVox_SurfaceExtractionController_H__
|
||||||
#define __PolyVox_SurfaceExtractionController_H__
|
#define __PolyVox_SurfaceExtractionController_H__
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
@ -42,6 +44,12 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DensityType getThreshold(void)
|
||||||
|
{
|
||||||
|
// Returns a threshold value halfway between the min and max possible values.
|
||||||
|
return ((std::numeric_limits<DensityType>::min)() + (std::numeric_limits<DensityType>::max)()) / 2;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,22 +43,11 @@ namespace PolyVox
|
|||||||
static uint8_t maxDensity() { return 255; }
|
static uint8_t maxDensity() { return 255; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename VoxelType>
|
|
||||||
class ConvertToMaterial
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef float MaterialType;
|
|
||||||
MaterialType operator()(VoxelType voxel)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename VolumeType>
|
template< typename VolumeType>
|
||||||
class SurfaceExtractor
|
class SurfaceExtractor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result, typename VoxelTypeTraits<typename VolumeType::VoxelType>::DensityType tThreshold = (VoxelTypeTraits<typename VolumeType::VoxelType>::minDensity() + VoxelTypeTraits<typename VolumeType::VoxelType>::maxDensity()) / 2);
|
SurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result);
|
||||||
|
|
||||||
void execute();
|
void execute();
|
||||||
|
|
||||||
@ -86,14 +75,14 @@ namespace PolyVox
|
|||||||
//FIXME - Should actually use DensityType here, both in principle and because the maths may be
|
//FIXME - Should actually use DensityType here, both in principle and because the maths may be
|
||||||
//faster (and to reduce casts). So it would be good to add a way to get DensityType from a voxel.
|
//faster (and to reduce casts). So it would be good to add a way to get DensityType from a voxel.
|
||||||
//But watch out for when the DensityType is unsigned and the difference could be negative.
|
//But watch out for when the DensityType is unsigned and the difference could be negative.
|
||||||
float voxel1nx = static_cast<float>(convertToDensity(volIter.peekVoxel1nx0py0pz()));
|
float voxel1nx = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx0py0pz()));
|
||||||
float voxel1px = static_cast<float>(convertToDensity(volIter.peekVoxel1px0py0pz()));
|
float voxel1px = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px0py0pz()));
|
||||||
|
|
||||||
float voxel1ny = static_cast<float>(convertToDensity(volIter.peekVoxel0px1ny0pz()));
|
float voxel1ny = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1ny0pz()));
|
||||||
float voxel1py = static_cast<float>(convertToDensity(volIter.peekVoxel0px1py0pz()));
|
float voxel1py = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1py0pz()));
|
||||||
|
|
||||||
float voxel1nz = static_cast<float>(convertToDensity(volIter.peekVoxel0px0py1nz()));
|
float voxel1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px0py1nz()));
|
||||||
float voxel1pz = static_cast<float>(convertToDensity(volIter.peekVoxel0px0py1pz()));
|
float voxel1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px0py1pz()));
|
||||||
|
|
||||||
return Vector3DFloat
|
return Vector3DFloat
|
||||||
(
|
(
|
||||||
@ -111,35 +100,35 @@ namespace PolyVox
|
|||||||
//FIXME - Should actually use DensityType here, both in principle and because the maths may be
|
//FIXME - Should actually use DensityType here, both in principle and because the maths may be
|
||||||
//faster (and to reduce casts). So it would be good to add a way to get DensityType from a voxel.
|
//faster (and to reduce casts). So it would be good to add a way to get DensityType from a voxel.
|
||||||
//But watch out for when the DensityType is unsigned and the difference could be negative.
|
//But watch out for when the DensityType is unsigned and the difference could be negative.
|
||||||
const float pVoxel1nx1ny1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1ny1nz()));
|
const float pVoxel1nx1ny1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1ny1nz()));
|
||||||
const float pVoxel1nx1ny0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1ny0pz()));
|
const float pVoxel1nx1ny0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1ny0pz()));
|
||||||
const float pVoxel1nx1ny1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1ny1pz()));
|
const float pVoxel1nx1ny1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1ny1pz()));
|
||||||
const float pVoxel1nx0py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx0py1nz()));
|
const float pVoxel1nx0py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx0py1nz()));
|
||||||
const float pVoxel1nx0py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx0py0pz()));
|
const float pVoxel1nx0py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx0py0pz()));
|
||||||
const float pVoxel1nx0py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx0py1pz()));
|
const float pVoxel1nx0py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx0py1pz()));
|
||||||
const float pVoxel1nx1py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1py1nz()));
|
const float pVoxel1nx1py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1py1nz()));
|
||||||
const float pVoxel1nx1py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1py0pz()));
|
const float pVoxel1nx1py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1py0pz()));
|
||||||
const float pVoxel1nx1py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1nx1py1pz()));
|
const float pVoxel1nx1py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1nx1py1pz()));
|
||||||
|
|
||||||
const float pVoxel0px1ny1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1ny1nz()));
|
const float pVoxel0px1ny1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1ny1nz()));
|
||||||
const float pVoxel0px1ny0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1ny0pz()));
|
const float pVoxel0px1ny0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1ny0pz()));
|
||||||
const float pVoxel0px1ny1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1ny1pz()));
|
const float pVoxel0px1ny1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1ny1pz()));
|
||||||
const float pVoxel0px0py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px0py1nz()));
|
const float pVoxel0px0py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px0py1nz()));
|
||||||
//const float pVoxel0px0py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px0py0pz()));
|
//const float pVoxel0px0py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px0py0pz()));
|
||||||
const float pVoxel0px0py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px0py1pz()));
|
const float pVoxel0px0py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px0py1pz()));
|
||||||
const float pVoxel0px1py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1py1nz()));
|
const float pVoxel0px1py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1py1nz()));
|
||||||
const float pVoxel0px1py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1py0pz()));
|
const float pVoxel0px1py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1py0pz()));
|
||||||
const float pVoxel0px1py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel0px1py1pz()));
|
const float pVoxel0px1py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel0px1py1pz()));
|
||||||
|
|
||||||
const float pVoxel1px1ny1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1ny1nz()));
|
const float pVoxel1px1ny1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1ny1nz()));
|
||||||
const float pVoxel1px1ny0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1ny0pz()));
|
const float pVoxel1px1ny0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1ny0pz()));
|
||||||
const float pVoxel1px1ny1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1ny1pz()));
|
const float pVoxel1px1ny1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1ny1pz()));
|
||||||
const float pVoxel1px0py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px0py1nz()));
|
const float pVoxel1px0py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px0py1nz()));
|
||||||
const float pVoxel1px0py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px0py0pz()));
|
const float pVoxel1px0py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px0py0pz()));
|
||||||
const float pVoxel1px0py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px0py1pz()));
|
const float pVoxel1px0py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px0py1pz()));
|
||||||
const float pVoxel1px1py1nz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1py1nz()));
|
const float pVoxel1px1py1nz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1py1nz()));
|
||||||
const float pVoxel1px1py0pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1py0pz()));
|
const float pVoxel1px1py0pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1py0pz()));
|
||||||
const float pVoxel1px1py1pz = static_cast<float>(convertToDnsity(volIter.peekVoxel1px1py1pz()));
|
const float pVoxel1px1py1pz = static_cast<float>(m_controller.convertToDensity(volIter.peekVoxel1px1py1pz()));
|
||||||
|
|
||||||
const float xGrad(- weights[0][0][0] * pVoxel1nx1ny1nz -
|
const float xGrad(- weights[0][0][0] * pVoxel1nx1ny1nz -
|
||||||
weights[1][0][0] * pVoxel1nx1ny0pz - weights[2][0][0] *
|
weights[1][0][0] * pVoxel1nx1ny0pz - weights[2][0][0] *
|
||||||
|
@ -24,16 +24,18 @@ freely, subject to the following restrictions:
|
|||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template<typename VolumeType>
|
template<typename VolumeType>
|
||||||
SurfaceExtractor<VolumeType>::SurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result, typename VoxelTypeTraits<typename VolumeType::VoxelType>::DensityType tThreshold)
|
SurfaceExtractor<VolumeType>::SurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result)
|
||||||
:m_volData(volData)
|
:m_volData(volData)
|
||||||
,m_sampVolume(volData)
|
,m_sampVolume(volData)
|
||||||
,m_meshCurrent(result)
|
,m_meshCurrent(result)
|
||||||
,m_regSizeInVoxels(region)
|
,m_regSizeInVoxels(region)
|
||||||
,m_tThreshold(tThreshold)
|
|
||||||
{
|
{
|
||||||
//m_regSizeInVoxels.cropTo(m_volData->getEnclosingRegion());
|
//m_regSizeInVoxels.cropTo(m_volData->getEnclosingRegion());
|
||||||
m_regSizeInCells = m_regSizeInVoxels;
|
m_regSizeInCells = m_regSizeInVoxels;
|
||||||
m_regSizeInCells.setUpperCorner(m_regSizeInCells.getUpperCorner() - Vector3DInt32(1,1,1));
|
m_regSizeInCells.setUpperCorner(m_regSizeInCells.getUpperCorner() - Vector3DInt32(1,1,1));
|
||||||
|
|
||||||
|
//FIXME - Check is m_controller is guarenteed to be valid at this point?!
|
||||||
|
m_tThreshold = m_controller.getThreshold();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename VolumeType>
|
template<typename VolumeType>
|
||||||
|
@ -56,12 +56,6 @@ namespace PolyVox
|
|||||||
static int32_t minDensity() { assert(false); return 0; }
|
static int32_t minDensity() { assert(false); return 0; }
|
||||||
static int32_t maxDensity() { assert(false); return 0; }
|
static int32_t maxDensity() { assert(false); return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename VoxelType>
|
|
||||||
typename VoxelTypeTraits<VoxelType>::DensityType convertToDensity(VoxelType voxel)
|
|
||||||
{
|
|
||||||
return voxel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__PolyVox_Voxel_H__
|
#endif //__PolyVox_Voxel_H__
|
||||||
|
@ -25,9 +25,4 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<Density8>::DensityType convertToDensity(Density8 voxel)
|
|
||||||
{
|
|
||||||
return voxel.getDensity();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -25,27 +25,4 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<MaterialDensityPair44>::DensityType convertToDensity(MaterialDensityPair44 voxel)
|
|
||||||
{
|
|
||||||
return voxel.getDensity();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
VoxelTypeTraits<MaterialDensityPair88>::DensityType convertToDensity(MaterialDensityPair88 voxel)
|
|
||||||
{
|
|
||||||
return voxel.getDensity();
|
|
||||||
}
|
|
||||||
|
|
||||||
//template<>
|
|
||||||
ConvertToMaterial<MaterialDensityPair44>::MaterialType ConvertToMaterial<MaterialDensityPair44>::operator()(MaterialDensityPair44 voxel)
|
|
||||||
{
|
|
||||||
return voxel.getMaterial();
|
|
||||||
}
|
|
||||||
|
|
||||||
//template<>
|
|
||||||
ConvertToMaterial<MaterialDensityPair88>::MaterialType ConvertToMaterial<MaterialDensityPair88>::operator()(MaterialDensityPair88 voxel)
|
|
||||||
{
|
|
||||||
return voxel.getMaterial();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -38,32 +38,32 @@ using namespace PolyVox;
|
|||||||
// They are conceptually the inverse of the 'convertToDensity' function used by the SurfaceExtractor. They probably shouldn't be part
|
// They are conceptually the inverse of the 'convertToDensity' function used by the SurfaceExtractor. They probably shouldn't be part
|
||||||
// of PolyVox, but they might be useful to other tests so we cold move them into a 'Tests.h' or something in the future.
|
// of PolyVox, but they might be useful to other tests so we cold move them into a 'Tests.h' or something in the future.
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
void writeDensityValueToVoxel(typename VoxelTypeTraits<VoxelType>::DensityType valueToWrite, VoxelType& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, VoxelType& voxel)
|
||||||
{
|
{
|
||||||
voxel = valueToWrite;
|
voxel = valueToWrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeDensityValueToVoxel(VoxelTypeTraits<Density8>::DensityType valueToWrite, Density8& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, Density8& voxel)
|
||||||
{
|
{
|
||||||
voxel.setDensity(valueToWrite);
|
voxel.setDensity(valueToWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeDensityValueToVoxel(VoxelTypeTraits<MaterialDensityPair88>::DensityType valueToWrite, MaterialDensityPair88& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, MaterialDensityPair88& voxel)
|
||||||
{
|
{
|
||||||
voxel.setDensity(valueToWrite);
|
voxel.setDensity(valueToWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
void writeMaterialValueToVoxel(typename VoxelTypeTraits<VoxelType>::MaterialType valueToWrite, VoxelType& voxel)
|
void writeMaterialValueToVoxel(int valueToWrite, VoxelType& voxel)
|
||||||
{
|
{
|
||||||
//Most types don't have a material
|
//Most types don't have a material
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeMaterialValueToVoxel(VoxelTypeTraits<MaterialDensityPair88>::MaterialType valueToWrite, MaterialDensityPair88& voxel)
|
void writeMaterialValueToVoxel(int valueToWrite, MaterialDensityPair88& voxel)
|
||||||
{
|
{
|
||||||
voxel.setMaterial(valueToWrite);
|
voxel.setMaterial(valueToWrite);
|
||||||
}
|
}
|
||||||
|
@ -63,24 +63,24 @@ void TestLowPassFilter::testExecute()
|
|||||||
pass1.execute();
|
pass1.execute();
|
||||||
|
|
||||||
std::cout << "Input volume:" << std::endl;
|
std::cout << "Input volume:" << std::endl;
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(0,0,0))) << std::endl; // 32
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(0,0,0).getDensity()) << std::endl; // 32
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(1,1,1))) << std::endl; // 0
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(1,1,1).getDensity()) << std::endl; // 0
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(2,2,2))) << std::endl; // 3
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(2,2,2).getDensity()) << std::endl; // 3
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(3,3,3))) << std::endl; // 0
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(3,3,3).getDensity()) << std::endl; // 0
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(4,4,4))) << std::endl; // 32
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(4,4,4).getDensity()) << std::endl; // 32
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(5,5,5))) << std::endl; // 0
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(5,5,5).getDensity()) << std::endl; // 0
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(6,6,6))) << std::endl; // 32
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(6,6,6).getDensity()) << std::endl; // 32
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(volData.getVoxelAt(7,7,7))) << std::endl; // 0
|
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(7,7,7).getDensity()) << std::endl; // 0
|
||||||
|
|
||||||
std::cout << std::endl << "Output volume:" << std::endl;
|
std::cout << std::endl << "Output volume:" << std::endl;
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(0,0,0))) << std::endl; // 4
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(0,0,0).getDensity()) << std::endl; // 4
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(1,1,1))) << std::endl; // 21
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(1,1,1).getDensity()) << std::endl; // 21
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(2,2,2))) << std::endl; // 10
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(2,2,2).getDensity()) << std::endl; // 10
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(3,3,3))) << std::endl; // 21
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(3,3,3).getDensity()) << std::endl; // 21
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(4,4,4))) << std::endl; // 10
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(4,4,4).getDensity()) << std::endl; // 10
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(5,5,5))) << std::endl; // 21
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(5,5,5).getDensity()) << std::endl; // 21
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(6,6,6))) << std::endl; // 10
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(6,6,6).getDensity()) << std::endl; // 10
|
||||||
std::cout << "Voxel = " << static_cast<int>(convertToDensity(resultVolume.getVoxelAt(7,7,7))) << std::endl; // 4
|
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(7,7,7).getDensity()) << std::endl; // 4
|
||||||
}
|
}
|
||||||
|
|
||||||
QTEST_MAIN(TestLowPassFilter)
|
QTEST_MAIN(TestLowPassFilter)
|
||||||
|
@ -37,32 +37,32 @@ using namespace PolyVox;
|
|||||||
// They are conceptually the inverse of the 'convertToDensity' function used by the SurfaceExtractor. They probably shouldn't be part
|
// They are conceptually the inverse of the 'convertToDensity' function used by the SurfaceExtractor. They probably shouldn't be part
|
||||||
// of PolyVox, but they might be usful to other tests so we cold move them into a 'Tests.h' or something in the future.
|
// of PolyVox, but they might be usful to other tests so we cold move them into a 'Tests.h' or something in the future.
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
void writeDensityValueToVoxel(typename VoxelTypeTraits<VoxelType>::DensityType valueToWrite, VoxelType& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, VoxelType& voxel)
|
||||||
{
|
{
|
||||||
voxel = valueToWrite;
|
voxel = valueToWrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeDensityValueToVoxel(VoxelTypeTraits<Density8>::DensityType valueToWrite, Density8& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, Density8& voxel)
|
||||||
{
|
{
|
||||||
voxel.setDensity(valueToWrite);
|
voxel.setDensity(valueToWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeDensityValueToVoxel(VoxelTypeTraits<MaterialDensityPair88>::DensityType valueToWrite, MaterialDensityPair88& voxel)
|
void writeDensityValueToVoxel(int valueToWrite, MaterialDensityPair88& voxel)
|
||||||
{
|
{
|
||||||
voxel.setDensity(valueToWrite);
|
voxel.setDensity(valueToWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
void writeMaterialValueToVoxel(typename VoxelTypeTraits<VoxelType>::MaterialType valueToWrite, VoxelType& voxel)
|
void writeMaterialValueToVoxel(int valueToWrite, VoxelType& voxel)
|
||||||
{
|
{
|
||||||
//Most types don't have a material
|
//Most types don't have a material
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void writeMaterialValueToVoxel(VoxelTypeTraits<MaterialDensityPair88>::MaterialType valueToWrite, MaterialDensityPair88& voxel)
|
void writeMaterialValueToVoxel(int valueToWrite, MaterialDensityPair88& voxel)
|
||||||
{
|
{
|
||||||
voxel.setMaterial(valueToWrite);
|
voxel.setMaterial(valueToWrite);
|
||||||
}
|
}
|
||||||
@ -92,7 +92,8 @@ void testForType(SurfaceMesh<PositionMaterialNormal>& result)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceExtractor< SimpleVolume<VoxelType> > extractor(&volData, volData.getEnclosingRegion(), &result, 50);
|
// THIS TEST IS BROKEN BECAUSE CUSTOM THRESHOLDS ARE TEMOPRARILY NOT WORKING.
|
||||||
|
SurfaceExtractor< SimpleVolume<VoxelType> > extractor(&volData, volData.getEnclosingRegion(), &result/*, 50*/);
|
||||||
extractor.execute();
|
extractor.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user