摘要: 测试目标点是否在多边形内int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy){ int i, j, c = 0; for (i = 0, j = nvert-1; i testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) c = !c; } return c;}ArgumentMeaningnve 阅读全文
posted @ 2014-03-05 11:58 superping 阅读(766) 评论(0) 推荐(0) 编辑