【问题标题】:WPF Polygon Intersection [duplicate]WPF多边形交点[重复]
【发布时间】:2014-06-28 11:53:40
【问题描述】:

检查两个凹面多边形是否重叠的最佳方法是什么?

bool IsIntersection(Polygon poly1, Polygon poly2) {
    // return true / false
}

【问题讨论】:

  • collisiondetection2d.net 有一本免费的电子书,里面有一些有用的建议
  • 也许可以,但它不是免费的
  • 我还在某处读到关于将每对面投影到 x 轴上并检查那里的重叠。编辑:这里:gamedevelopment.tutsplus.com/tutorials/collision-detection-using-the-separating-axis-theorem--gamedev-169
  • 我的多边形不是凸的,所以我不能使用那个定理

标签: c# wpf algorithm geometry polygon


【解决方案1】:

我在这里找到了我的解决方案。它基于段相交。

http://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/

【讨论】:

    猜你喜欢
    • 2012-02-28
    • 2013-03-20
    • 2014-01-24
    • 1970-01-01
    • 1970-01-01
    • 2011-07-08
    • 2015-02-27
    • 1970-01-01
    相关资源
    最近更新 更多