Rayintersecttwice
From GMLwiki
- pt:P3 dir:P3 -> t1:F e1:E p1:P3 \n\
- flag1:I t2:F e2:E p2:P3 flag2:I 2
- pt:P3 dir:P3 -> t1:F e1:E p1:P3 flag1:I 1
- pt:P3 dir:P3 -> 0
[edit] Description
shoots a ray (pt,dir) to the mesh and looks for the FIRST TWO hits, as (t1,e1,p1,flag1) and (t2,e2,p2,flag2):
- flag = 1: face was hit
- flag = 2: edge was hit
- flag = 3: vertex was hit
t is the parameter for the hit point p: p = pt+t*dir e is the edge that was hit, for face hit (flag=1) it's the edge closest to p
