摘要:
//求直线 s1 s2 与三角形v0,v1,v2的交点e1 = v1 - v0;e2 = v2 - v0;dir = s2 - s1;p = cross_product(dir, e2);tmp = (num_type)1/(p*e1);s = s1 - v0;u = tmp * s * p;if(u 1){ //the intersection is not in the triangle return;}q = cross_product(s, e1);v = tmp * dir * q;if(v 1){ //the intersection is not in th... 阅读全文
posted @ 2014-03-06 16:42
索罗格
阅读(763)
评论(0)
推荐(0)

浙公网安备 33010602011771号