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


Calls

proc~~tem_planecubeoverlap~2~~CallsGraph proc~tem_planecubeoverlap~2 tem_planeCubeOverlap proc~tem_trianglecubeoverlap tem_triangleCubeOverlap proc~tem_planecubeoverlap~2->proc~tem_trianglecubeoverlap proc~triboxoverlap_loc triBoxOverlap_loc proc~tem_trianglecubeoverlap->proc~triboxoverlap_loc proc~axistest Axistest proc~triboxoverlap_loc->proc~axistest proc~planeboxoverlap planeBoxOverlap proc~triboxoverlap_loc->proc~planeboxoverlap proc~cross_product3d cross_product3D proc~triboxoverlap_loc->proc~cross_product3d proc~axistest->proc~cross_product3d

Contents

Source Code


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