How to tell if a line intersects a polygon in C#?

后端 未结 4 1895
悲&欢浪女
悲&欢浪女 2020-12-31 18:17

I have a question very similar to this:

How to know if a line intersects a plane in C#?

I am searching for a method (in C#) tha

4条回答
  •  醉酒成梦
    2020-12-31 18:58

    This article looks like it will help

    http://www.codeproject.com/KB/recipes/2dpolyclip.aspx

    This code is a two-dimensional polygon-clipping algorithm that determines precisely where a line intersects with a polygon border. This code works for both concave and convex polygons of completely arbitrary shape and is able to handle any line orientation.

提交回复
热议问题