Work on voxel refactoring...

This commit is contained in:
unknown
2012-03-27 14:21:43 +02:00
parent 1f748cbd72
commit 6d656ad173
3 changed files with 20 additions and 10 deletions

View File

@ -31,6 +31,11 @@ freely, subject to the following restrictions:
using namespace PolyVox;
bool isVoxelTransparent(Material8 voxel)
{
return voxel.getMaterial() == 0;
}
void TestAmbientOcclusionGenerator::testExecute()
{
const int32_t g_uVolumeSideLength = 64;
@ -59,7 +64,7 @@ void TestAmbientOcclusionGenerator::testExecute()
Array<3, uint8_t> ambientOcclusionResult(ArraySizes(g_uArraySideLength)(g_uArraySideLength)(g_uArraySideLength));
//Create the ambient occlusion calculator
AmbientOcclusionCalculator<SimpleVolume, Material8> calculator(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255);
AmbientOcclusionCalculator<SimpleVolume, Material8> calculator(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255, isVoxelTransparent);
//Execute the calculator
calculator.execute();