rayCubeOverlap Function

private function rayCubeOverlap(line, cube, pntIntersect) result(overlap)

Function computes intersection of ray with cube

The algorithm for lineCubeOverlap used in this function is taken from http://www.siggraph.org/education/materials/HyperGraph/raytrace/ rtinter3.htm http://gamedev.stackexchange.com/questions/18436/ most-efficient-aabb-vs-ray-collision-algorithms

Arguments

TypeIntentOptionalAttributesName
type(tem_line_type), intent(in) :: line

line segment to check for interection

type(tem_cube_type), intent(in) :: cube

cube to check intersection of line

real(kind=rk), intent(out), optional :: pntIntersect(3)

intersection point if there is intersection

Return Value logical


Called by

proc~~raycubeoverlap~~CalledByGraph proc~raycubeoverlap rayCubeOverlap proc~tem_linecubeoverlap tem_lineCubeOverlap proc~tem_linecubeoverlap->proc~raycubeoverlap proc~tem_cylindercubeoverlap tem_cylinderCubeOverlap proc~tem_cylindercubeoverlap->proc~tem_linecubeoverlap proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_linecubeoverlap proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_cylindercubeoverlap proc~tem_shape_subtreefromgeominters->proc~tem_cano_initsubtree proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->proc~tem_shape_subtreefromgeominters

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: i
real(kind=rk), private :: t_near
real(kind=rk), private :: t_far
real(kind=rk), private :: T_1
real(kind=rk), private :: T_2
real(kind=rk), private :: tmp