testy)!=(verty[j]>testy))&&(testx<(vertx[j]-vertx[i])*(testy-verty[i])/(verty[j]-verty[i])+ver" />

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

PNPOLY - Point Inclusion in Polygon W. Rando

系統(tǒng) 2651 0
    測試目標點是否在多邊形內(nèi)
    
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy) { int i, j, c = 0; for (i = 0, j = nvert-1; i < nvert; j = i++) { if ( ((verty[i]>testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) c = !c; } return c; }
Argument Meaning
nvert Number of vertices in the polygon. Whether to repeat the first vertex at the end is discussed below.
vertx, verty Arrays containing the x- and y-coordinates of the polygon's vertices.
testx, testy X- and y-coordinate of the test point.

http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

PNPOLY - Point Inclusion in Polygon W. Randolph Franklin


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 镇宁| 仙桃市| 深水埗区| 赫章县| 铜鼓县| 县级市| 太仓市| 化州市| 凌源市| 洪雅县| 伊川县| 岢岚县| 天柱县| 安化县| 赤峰市| 通道| 高唐县| 铁力市| 曲周县| 南康市| 宁南县| 永嘉县| 灵宝市| 孟津县| 武汉市| 津市市| 盐边县| 富宁县| 德格县| 麻栗坡县| 朔州市| 陕西省| 崇阳县| 浦城县| 梁山县| 皮山县| 宜章县| 星座| 栾川县| 武强县| 卢氏县|