This function checks intesection of solid cube and sphere
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_sphere_type), | intent(in) | :: | sphere | |||
type(tem_cube_type), | intent(in) | :: | cube |
function tem_sphereCubeOverlap(sphere, cube) result(overlap)
! -------------------------------------------------------------------------!
!interface variables
type(tem_sphere_type), intent(in) :: sphere !< spacer geometry data
type(tem_cube_type), intent(in) :: cube
logical :: overlap !< return value
! -------------------------------------------------------------------------!
if(sphere%only_surface) then
overlap = hollowSphereCubeOverlap(sphere, cube)
else
overlap = solidSphereCubeOverlap(sphere, cube)
endif
end function tem_sphereCubeOverlap