Added an optimization note.

This commit is contained in:
David Williams 2012-12-02 17:43:36 +01:00
parent 47e8f4a86d
commit f4917e5001

View File

@ -98,6 +98,8 @@ namespace PolyVox
AmbientOcclusionCalculatorRaycastCallback<IsVoxelTransparentCallback> ambientOcclusionCalculatorRaycastCallback(isVoxelTransparentCallback);
RaycastResult result = raycastWithDirection(volInput, v3dRayStart, v3dRayDirection, ambientOcclusionCalculatorRaycastCallback);
// Note - The performance of this could actually be improved it we exited as soon
// as the ray left the volume. The raycast test has an example of how to do this.
if(result == RaycastResults::Completed)
{
++uVisibleDirections;