calculateAmbientOcclusion() now works with both RawVolume and PagedVolume.

This commit is contained in:
David Williams
2015-03-30 11:44:25 +02:00
parent d000616d3e
commit b415e5c5f3
3 changed files with 20 additions and 13 deletions

View File

@ -45,7 +45,7 @@ namespace PolyVox
* Ambient occlusion
*/
template<typename IsVoxelTransparentCallback>
template<typename VolumeType, typename IsVoxelTransparentCallback>
class AmbientOcclusionCalculatorRaycastCallback
{
public:
@ -53,9 +53,9 @@ namespace PolyVox
{
}
bool operator()(const PagedVolume<uint8_t>::Sampler& sampler)
bool operator()(const typename VolumeType::Sampler& sampler)
{
uint8_t sample = sampler.getVoxel();
auto sample = sampler.getVoxel();
bool func = mIsVoxelTransparentCallback(sample);
return func;
}