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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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 |