The tutorial on your site should at least have a notice that the code's out of date.
The constructor syntax for CubicSurfaceExtractorWithNormals doesn't use the new style of
Code:
CubicSurfaceExtractorWithNormals<SimpleVolume<MaterialDensityPair44>>
surfaceExtractor(...)
Also this portion of the sphere creation code doesn't work:
Code:
uint8_t uDensity = MaterialDensityPair44::getMaxDensity();
//Get the old voxel
MaterialDensityPair44 voxel = volData.getVoxelAt(x,y,z);
//Modify the density
voxel.setDensity(uDensity);
//Wrte the voxel value into the volume
volData.setVoxelAt(x, y, z, voxel);
It instead needs to be changed to:
Code:
volData->setVoxelAt(x, y, z, MaterialDensityPair44(1,MaterialDensityPair44::getMaxDensity()));
I have lost nearly 2 days of my time sorting this out : \