tem_triangleCubeOverlap Function

public function tem_triangleCubeOverlap(triangle, cube) result(overlaps)

Compute, if the triangle intersects the cube.

Arguments

Type IntentOptional Attributes Name
type(tem_triangle_type), intent(in) :: triangle
type(tem_cube_type), intent(in) :: cube

Return Value logical


Calls

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

Called by

proc~~tem_trianglecubeoverlap~~CalledByGraph proc~tem_trianglecubeoverlap tem_triangleCubeOverlap proc~tem_planecubeoverlap tem_planeCubeOverlap proc~tem_planecubeoverlap->proc~tem_trianglecubeoverlap proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_trianglecubeoverlap proc~tem_stlcubeoverlap tem_stlCubeOverlap proc~tem_shape_subtreefromgeominters->proc~tem_stlcubeoverlap proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_shape_subtreefromgeominters->proc~tem_cano_initsubtree proc~tem_stlcubeoverlap->proc~tem_trianglecubeoverlap proc~tem_boxcubeoverlap tem_boxCubeOverlap proc~tem_boxcubeoverlap->proc~tem_planecubeoverlap proc~tem_cano_initsubtree->proc~tem_planecubeoverlap proc~tem_cano_initsubtree->proc~tem_boxcubeoverlap proc~tem_shape2subtree tem_shape2subTree proc~tem_shape2subtree->proc~tem_shape_subtreefromgeominters proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->proc~tem_shape2subtree proc~tem_create_subtree_of_st_funlist tem_create_subTree_of_st_funList proc~tem_create_subtree_of_st_funlist->proc~tem_create_subtree_of proc~tem_init_convergence tem_init_convergence proc~tem_init_convergence->proc~tem_create_subtree_of proc~tem_init_tracker_subtree tem_init_tracker_subTree proc~tem_init_tracker_subtree->proc~tem_create_subtree_of proc~tem_write_debugmesh tem_write_debugMesh proc~tem_write_debugmesh->proc~tem_create_subtree_of

Source Code

  function tem_triangleCubeOverlap(triangle, cube) result(overlaps)
    !--------------------------------------------------------------------------!
    type(tem_triangle_type), intent(in) :: triangle
    type(tem_cube_type), intent(in) :: cube
    logical :: overlaps
    !--------------------------------------------------------------------------!
    real(kind=rk) :: halfwidth
    !--------------------------------------------------------------------------!

    ! halfwidth is increased by eps to avoid precision problem in
    ! triangöe box intersection.
    halfwidth = cube%halfwidth + eps
    overlaps = triBoxOverlap_loc( cube%center,                       &
      &                           [halfwidth, halfwidth, halfwidth], &
      &                           triangle%nodes )

  end function tem_triangleCubeOverlap