triBoxOverlap_loc Function

private function triBoxOverlap_loc(boxCenter, boxHalfwidth, triNodes) result(overlaps)

This routine checks for triangle box overlap

this routine is conversion of c-code tribox3.c triBoxOverlap function. use separating axis theorem to test overlap between triangle and box need to test for overlap in these directions: 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle we do not even need to test these) 2) normal of the triangle 3) separating axis test. crossproduct(edge from tri, {x,y,z}-directin) this gives 3x3=9 more 7tests This code is available at: http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/code/tribox3.txt

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: boxCenter(3)

box center

real(kind=rk), intent(in) :: boxHalfwidth(3)

halfwidth of the box

real(kind=rk), intent(in) :: triNodes(3,3)

nodes of the triangle 1st index denote x,y,z coordinates and 2nd index denote nodes

Return Value logical


Calls

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

Called by

proc~~triboxoverlap_loc~~CalledByGraph proc~triboxoverlap_loc triBoxOverlap_loc proc~tem_trianglecubeoverlap tem_triangleCubeOverlap proc~tem_trianglecubeoverlap->proc~triboxoverlap_loc 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_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->proc~tem_shape_subtreefromgeominters proc~tem_cano_initsubtree->proc~tem_planecubeoverlap proc~tem_boxcubeoverlap tem_boxCubeOverlap proc~tem_cano_initsubtree->proc~tem_boxcubeoverlap proc~tem_boxcubeoverlap->proc~tem_planecubeoverlap proc~tem_write_debugmesh tem_write_debugMesh proc~tem_write_debugmesh->proc~tem_create_subtree_of program~tem_varsys_test tem_varSys_test program~tem_varsys_test->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_init_convergence tem_init_convergence proc~tem_init_convergence->proc~tem_create_subtree_of 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

Contents


Variables

TypeVisibilityAttributesNameInitial
real(kind=rk), private :: nodes(3,3)
real(kind=rk), private :: dirVec1(3)
real(kind=rk), private :: dirVec2(3)
real(kind=rk), private :: dirVec3(3)
real(kind=rk), private :: mmin
real(kind=rk), private :: mmax
real(kind=rk), private :: normal(3)
real(kind=rk), private :: edge1(3)
real(kind=rk), private :: edge2(3)
real(kind=rk), private :: edge3(3)