Passing parameter as const ref.
This commit is contained in:
parent
1c17a7147b
commit
413bb95b1a
@ -74,7 +74,7 @@ namespace PolyVox
|
||||
|
||||
/// Calculate the ambient occlusion for the volume
|
||||
template<typename VolumeType, typename IsVoxelTransparentCallback>
|
||||
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"
|
||||
|
@ -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<typename VolumeType, typename IsVoxelTransparentCallback>
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user