tem_planeCubeOverlap Function

public function tem_planeCubeOverlap(plane, cube) result(overlap)

This function checks for intersection of plane and cube by checking two triangles of plane with a cube

Arguments

Type IntentOptional Attributes Name
type(tem_plane_type), intent(in) :: plane
type(tem_cube_type), intent(in) :: cube

Return Value logical


Source Code

  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