【发布时间】:2013-07-11 23:02:08
【问题描述】:
我找到了一个很好的算法来检查 tri/tri 交叉点,但如果它们只在边缘或边缘的某个点相遇(没有重叠),我希望它会失败。基本上是想重叠,而且触摸是不够的。
有人知道怎么调整吗?
http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/code/opttritri.txt
例如。应该失败
float a1[3] = { 0, 0, 0 };
float a2[3] = { 2, 0, 0 };
float a3[3] = { 0, 1, 0 };
float b1[3] = { 0, 0, 0 };
float b2[3] = { 2, 0, 0 };
float b3[3] = { 0, -1, 0 };
bool inters = NoDivTriTriIsect(a1, a2, a3, b1, b2, b3);
【问题讨论】:
-
请注意“触摸边缘”的数值稳定性较差。
标签: c++ math geometry intersection