Ambient occlusion test now uses RawVolume, as it need a fixed size volume to create a temporary array.
This commit is contained in:
parent
e7f41b7e0f
commit
396d1cfc59
@ -33,7 +33,7 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
//These two should not be here!
|
//These two should not be here!
|
||||||
#include "PolyVox/Material.h"
|
#include "PolyVox/Material.h"
|
||||||
#include "PolyVox/PagedVolume.h"
|
#include "PolyVox/RawVolume.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator()(const PagedVolume<uint8_t>::Sampler& sampler)
|
bool operator()(const RawVolume<uint8_t>::Sampler& sampler)
|
||||||
{
|
{
|
||||||
uint8_t sample = sampler.getVoxel();
|
uint8_t sample = sampler.getVoxel();
|
||||||
bool func = mIsVoxelTransparentCallback(sample);
|
bool func = mIsVoxelTransparentCallback(sample);
|
||||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
|||||||
#include "TestAmbientOcclusionGenerator.h"
|
#include "TestAmbientOcclusionGenerator.h"
|
||||||
|
|
||||||
#include "PolyVox/AmbientOcclusionCalculator.h"
|
#include "PolyVox/AmbientOcclusionCalculator.h"
|
||||||
#include "PolyVox/PagedVolume.h"
|
#include "PolyVox/RawVolume.h"
|
||||||
|
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ void TestAmbientOcclusionGenerator::testExecute()
|
|||||||
const int32_t g_uVolumeSideLength = 64;
|
const int32_t g_uVolumeSideLength = 64;
|
||||||
|
|
||||||
//Create empty volume
|
//Create empty volume
|
||||||
PagedVolume<uint8_t> volData;
|
RawVolume<uint8_t> volData(Region(0, 0, 0, g_uVolumeSideLength - 1, g_uVolumeSideLength - 1, g_uVolumeSideLength - 1));
|
||||||
|
|
||||||
//Create two solid walls at opposite sides of the volume
|
//Create two solid walls at opposite sides of the volume
|
||||||
for (int32_t z = 0; z < g_uVolumeSideLength; z++)
|
for (int32_t z = 0; z < g_uVolumeSideLength; z++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user