Fixes to behavour of LowPassFilter.
This commit is contained in:
@ -33,7 +33,7 @@ using namespace PolyVox;
|
||||
|
||||
void TestLowPassFilter::testExecute()
|
||||
{
|
||||
const int32_t g_uVolumeSideLength = 16;
|
||||
const int32_t g_uVolumeSideLength = 8;
|
||||
|
||||
Region reg(Vector3DInt32(0,0,0), Vector3DInt32(g_uVolumeSideLength-1, g_uVolumeSideLength-1, g_uVolumeSideLength-1));
|
||||
|
||||
@ -60,11 +60,27 @@ void TestLowPassFilter::testExecute()
|
||||
|
||||
LowPassFilter<RawVolume, RawVolume, Density8> pass1(&volData, reg, &resultVolume, reg, 5);
|
||||
|
||||
pass1.executeSAT();
|
||||
pass1.execute();
|
||||
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(1,2,3).getDensity()) << std::endl; // 7
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(10,6,7).getDensity()) << std::endl; // 17
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(15,2,12).getDensity()) << std::endl; // 4
|
||||
std::cout << "Input volume:" << std::endl;
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(0,0,0).getDensity()) << std::endl; // 32
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(1,1,1).getDensity()) << std::endl; // 0
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(2,2,2).getDensity()) << std::endl; // 3
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(3,3,3).getDensity()) << std::endl; // 0
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(4,4,4).getDensity()) << std::endl; // 32
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(5,5,5).getDensity()) << std::endl; // 0
|
||||
std::cout << "Voxel = " << static_cast<int>(volData.getVoxelAt(6,6,6).getDensity()) << std::endl; // 32
|
||||
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 << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(0,0,0).getDensity()) << std::endl; // 4
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(1,1,1).getDensity()) << std::endl; // 21
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(2,2,2).getDensity()) << std::endl; // 10
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(3,3,3).getDensity()) << std::endl; // 21
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(4,4,4).getDensity()) << std::endl; // 10
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(5,5,5).getDensity()) << std::endl; // 21
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(6,6,6).getDensity()) << std::endl; // 10
|
||||
std::cout << "Voxel = " << static_cast<int>(resultVolume.getVoxelAt(7,7,7).getDensity()) << std::endl; // 4
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestLowPassFilter)
|
||||
|
Reference in New Issue
Block a user