Return the (square) distance from point to AABB's facets.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(vector_R8P), | intent(in) | :: | point | Point reference. |
Distance from point to AABB's facets.
pure function distance_from_facets(self, point) result(distance)
!< Return the (square) distance from point to AABB's facets.
class(aabb_node_object), intent(in) :: self !< AABB.
type(vector_R8P), intent(in) :: point !< Point reference.
real(R8P) :: distance !< Distance from point to AABB's facets.
distance = MaxR8P
if (allocated(self%aabb)) distance = self%aabb%distance_from_facets(point=point)
endfunction distance_from_facets