in_range Function

private pure function in_range(point, min_distance, max_distance)

Along the boresight (-z) between the distances (a point ahead of the apex).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: point(3)

in the cone's frame (scene units)

real(kind=wp), intent(in), optional :: min_distance

along the boresight (scene units)

real(kind=wp), intent(in), optional :: max_distance

along the boresight (scene units)

Return Value logical


Called by

proc~~in_range~~CalledByGraph proc~in_range in_range proc~cone_is_visible PolyhedralCone%cone_is_visible proc~cone_is_visible->proc~in_range proc~elliptic_is_visible EllipticCone%elliptic_is_visible proc~elliptic_is_visible->proc~in_range

Source Code

    pure logical function in_range(point, min_distance, max_distance)
        real(wp), intent(in) :: point(3)                    !! in the cone's frame (scene units)
        real(wp), intent(in), optional :: min_distance, max_distance  !! along the boresight (scene units)
        real(wp) :: d
        d = -point(3)
        in_range = d >= 0.0_wp
        if (present(min_distance)) in_range = in_range .and. d >= min_distance
        if (present(max_distance)) in_range = in_range .and. d <= max_distance
    end function in_range