QueryVisibilityDistance
Based on the parameters set by the last StartXXVisibilityQuery call (either StartShadowVisibilityQuery or StartViewshedVisibilityQuery), this method gets the point along the path from the origin of the shadow (QuerySperePosition) or viewshed source where the visibility or shadow is blocked by the terrain or a ground object.
JavaScript |
|
|
|
QueryVisibilityDistance( QueryPosition) |
C# |
|
|
|
double QueryVisibilityDistance ( IPosition80 QueryPosition) |
C++ |
|
|
|
HRESULT QueryVisibilityDistance ( IPosition80* QueryPosition, double* pVal) |
Parameters
QueryPosition
An IPosition80representing the position of the endpoint of the path from the origin of the shadow (QuerySperePosition) or viewshed source that is being queried for the presence of a terrain or ground object.
Return Value
pVal
The distance to the point along the path from the origin of the shadow (QuerySperePosition) or viewshed source where the visibility or shadow is blocked by the terrain or a ground object.
-1 is returned if the query position is outside the range of the viewshed or shadow analysis. This range is defined in the StartShadowVisibilityQuery and StartViewshedVisibilityQuery.
Note: The distance is returned whether or not the visibility was blocked by a ground object or terrain. Use QueryPointVisibility to determine whether visibility was blocked.
Exceptions
HRESULT can return any of the values listed in the HRESULT Return Values list.