@@ -242,6 +242,7 @@ bool ViewshedExecutor::writeLine(int nLine, std::vector<double> &vResult)
242242// / @param nYOffset Y offset of the line being adjusted.
243243// / @param vThisLineVal Line height data.
244244// / @param vPitchMaskVal Pitch masking line.
245+ // / @param vResult Initialized Result vector.
245246// / @return Processing limits of the line based on min/max distance.
246247LineLimits ViewshedExecutor::adjustHeight (int nYOffset,
247248 std::vector<double > &vThisLineVal,
@@ -342,6 +343,12 @@ LineLimits ViewshedExecutor::adjustHeight(int nYOffset,
342343 return ll;
343344}
344345
346+ // / Calculate the pitch masking value to apply after running the viewshed algorithm.
347+ // /
348+ // / @param dfZ Adjusted input height.
349+ // / @param dfDist Distance from observer to cell.
350+ // / @param dfResult Result value to which adjustment may be added.
351+ // / @param maskVal Output mask value.
345352void ViewshedExecutor::calcPitchMask (double dfZ, double dfDist, double dfResult,
346353 double &maskVal)
347354{
@@ -428,6 +435,11 @@ bool ViewshedExecutor::processFirstLine(std::vector<double> &vLastLineVal)
428435 return oProgress.lineComplete ();
429436}
430437
438+ // / Set the pitch masked value into the result vector when applicable.
439+ // /
440+ // / @param vResult Result vector.
441+ // / @param vPitchMaskVal Pitch mask values (nan is no masking, inf is out-of-range, else
442+ // / actual value).
431443void ViewshedExecutor::applyPitchMask (std::vector<double > &vResult,
432444 const std::vector<double > &vPitchMaskVal)
433445{
@@ -442,8 +454,8 @@ void ViewshedExecutor::applyPitchMask(std::vector<double> &vResult,
442454 }
443455}
444456
445- // If the observer is above or below the raster, set all cells in the first line near the
446- // observer as observable provided they're in range. Mark cells out of range as such.
457+ // / If the observer is above or below the raster, set all cells in the first line near the
458+ // / observer as observable provided they're in range. Mark cells out of range as such.
447459// / @param ll Line limits for processing.
448460// / @param vResult Result line.
449461// / @param vThisLineVal Heights of the cells in the target line
0 commit comments