This function checks for intersection of plane and cube by checking two triangles of plane with a cube
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_plane_type), | intent(in) | :: | plane | |||
type(tem_cube_type), | intent(in) | :: | cube |
function tem_planeCubeOverlap( plane, cube ) result(overlap)
!--------------------------------------------------------------------------!
type(tem_plane_type), intent(in) :: plane
type(tem_cube_type), intent(in) :: cube
logical :: overlap
!--------------------------------------------------------------------------!
integer :: iTri
overlap = .false.
do iTri = 1, 2
overlap = overlap .or. &
& tem_triangleCubeOverlap( plane%triangle(iTri), cube )
end do
end function tem_planeCubeOverlap