diff --git a/include/PolyVox/AmbientOcclusionCalculator.h b/include/PolyVox/AmbientOcclusionCalculator.h index bdd10de7..72f80bf1 100644 --- a/include/PolyVox/AmbientOcclusionCalculator.h +++ b/include/PolyVox/AmbientOcclusionCalculator.h @@ -74,7 +74,7 @@ namespace PolyVox /// Calculate the ambient occlusion for the volume template - void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback); + void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, const Region& region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback); } #include "PolyVox/AmbientOcclusionCalculator.inl" diff --git a/include/PolyVox/AmbientOcclusionCalculator.inl b/include/PolyVox/AmbientOcclusionCalculator.inl index be9db40e..cea5897a 100644 --- a/include/PolyVox/AmbientOcclusionCalculator.inl +++ b/include/PolyVox/AmbientOcclusionCalculator.inl @@ -32,7 +32,7 @@ namespace PolyVox * \param isVoxelTransparentCallback A callback which takes a \a VoxelType and returns a \a bool whether the voxel is transparent */ template - void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback) + void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, const Region& region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback) { //Make sure that the size of the volume is an exact multiple of the size of the array. if(volInput->getWidth() % arrayResult->getDimension(0) != 0)