Lines Matching refs:dir
500 if (r.dir.x >= 0) in findEntryAndExitPoints()
505 if (r.dir.x > 1 || in findEntryAndExitPoints()
506 (abs (d1) < TMAX * r.dir.x && in findEntryAndExitPoints()
507 abs (d2) < TMAX * r.dir.x)) in findEntryAndExitPoints()
509 T t1 = d1 / r.dir.x; in findEntryAndExitPoints()
510 T t2 = d2 / r.dir.x; in findEntryAndExitPoints()
517 exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
518 exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
526 entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
527 entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
540 if (r.dir.x < -1 || in findEntryAndExitPoints()
541 (abs (d1) < -TMAX * r.dir.x && in findEntryAndExitPoints()
542 abs (d2) < -TMAX * r.dir.x)) in findEntryAndExitPoints()
544 T t1 = d1 / r.dir.x; in findEntryAndExitPoints()
545 T t2 = d2 / r.dir.x; in findEntryAndExitPoints()
552 exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
553 exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
561 entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
562 entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
575 if (r.dir.y >= 0) in findEntryAndExitPoints()
580 if (r.dir.y > 1 || in findEntryAndExitPoints()
581 (abs (d1) < TMAX * r.dir.y && in findEntryAndExitPoints()
582 abs (d2) < TMAX * r.dir.y)) in findEntryAndExitPoints()
584 T t1 = d1 / r.dir.y; in findEntryAndExitPoints()
585 T t2 = d2 / r.dir.y; in findEntryAndExitPoints()
591 exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
593 exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
600 entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
602 entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
615 if (r.dir.y < -1 || in findEntryAndExitPoints()
616 (abs (d1) < -TMAX * r.dir.y && in findEntryAndExitPoints()
617 abs (d2) < -TMAX * r.dir.y)) in findEntryAndExitPoints()
619 T t1 = d1 / r.dir.y; in findEntryAndExitPoints()
620 T t2 = d2 / r.dir.y; in findEntryAndExitPoints()
626 exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
628 exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
635 entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
637 entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); in findEntryAndExitPoints()
650 if (r.dir.z >= 0) in findEntryAndExitPoints()
655 if (r.dir.z > 1 || in findEntryAndExitPoints()
656 (abs (d1) < TMAX * r.dir.z && in findEntryAndExitPoints()
657 abs (d2) < TMAX * r.dir.z)) in findEntryAndExitPoints()
659 T t1 = d1 / r.dir.z; in findEntryAndExitPoints()
660 T t2 = d2 / r.dir.z; in findEntryAndExitPoints()
666 exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
667 exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
675 entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
676 entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
690 if (r.dir.z < -1 || in findEntryAndExitPoints()
691 (abs (d1) < -TMAX * r.dir.z && in findEntryAndExitPoints()
692 abs (d2) < -TMAX * r.dir.z)) in findEntryAndExitPoints()
694 T t1 = d1 / r.dir.z; in findEntryAndExitPoints()
695 T t2 = d2 / r.dir.z; in findEntryAndExitPoints()
701 exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
702 exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
710 entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); in findEntryAndExitPoints()
711 entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); in findEntryAndExitPoints()
794 if (r.dir.x > 0) in intersects()
801 if (r.dir.x > 1 || d < TMAX * r.dir.x) in intersects()
803 T t = d / r.dir.x; in intersects()
812 T t = (r.dir.x > 1 || d < TMAX * r.dir.x)? d / r.dir.x: TMAX; in intersects()
819 ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); in intersects()
820 ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); in intersects()
824 else if (r.dir.x < 0) in intersects()
831 if (r.dir.x < -1 || d > TMAX * r.dir.x) in intersects()
833 T t = d / r.dir.x; in intersects()
842 T t = (r.dir.x < -1 || d > TMAX * r.dir.x)? d / r.dir.x: TMAX; in intersects()
849 ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); in intersects()
850 ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); in intersects()
864 if (r.dir.y > 0) in intersects()
871 if (r.dir.y > 1 || d < TMAX * r.dir.y) in intersects()
873 T t = d / r.dir.y; in intersects()
882 T t = (r.dir.y > 1 || d < TMAX * r.dir.y)? d / r.dir.y: TMAX; in intersects()
888 ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); in intersects()
890 ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); in intersects()
894 else if (r.dir.y < 0) in intersects()
901 if (r.dir.y < -1 || d > TMAX * r.dir.y) in intersects()
903 T t = d / r.dir.y; in intersects()
912 T t = (r.dir.y < -1 || d > TMAX * r.dir.y)? d / r.dir.y: TMAX; in intersects()
918 ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); in intersects()
920 ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); in intersects()
934 if (r.dir.z > 0) in intersects()
941 if (r.dir.z > 1 || d < TMAX * r.dir.z) in intersects()
943 T t = d / r.dir.z; in intersects()
952 T t = (r.dir.z > 1 || d < TMAX * r.dir.z)? d / r.dir.z: TMAX; in intersects()
958 ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); in intersects()
959 ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); in intersects()
964 else if (r.dir.z < 0) in intersects()
971 if (r.dir.z < -1 || d > TMAX * r.dir.z) in intersects()
973 T t = d / r.dir.z; in intersects()
982 T t = (r.dir.z < -1 || d > TMAX * r.dir.z)? d / r.dir.z: TMAX; in intersects()
988 ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); in intersects()
989 ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); in intersects()