怎么判断多个点在一个封闭曲线的内部

Tina1sg 2016-03-02 08:06:11
如何判断多个点在一个封闭曲线的内部,求前辈指导,谢谢啦
...全文
397 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
schlafenhamster 2016-03-03
  • 打赏
  • 举报
回复
CRgn::PtInRegion BOOL PtInRegion( int x, int y ) const; BOOL PtInRegion( POINT point ) const; Return Value Nonzero if the point is in the region; otherwise 0. Parameters x Specifies the logical x-coordinate of the point to test. y Specifies the logical y-coordinate of the point to test. point The x- and y-coordinates of point specify the x- and y-coordinates of the point to test the value of. The point parameter can either be a POINT structure or a CPoint object. Remarks Checks whether the point given by x and y is in the region stored in the CRgn object. 用闭合曲线做个 Rgn
赵4老师 2016-03-03
  • 打赏
  • 举报
回复
PtInRegion The PtInRegion function determines whether the specified point is inside the specified region. BOOL PtInRegion( HRGN hrgn, // handle to region int X, // x-coordinate of point int Y // y-coordinate of point ); Parameters hrgn Handle to the region to be examined. X Specifies the x-coordinate of the point. Y Specifies the y-coordinate of the point. Return Values If the specified point is in the region, the return value is nonzero. If the specified point is not in the region, the return value is zero. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Requires version 1.0 or later. Header: Declared in wingdi.h. Import Library: Use gdi32.lib. See Also Regions Overview, Region Functions, RectInRegion
白玉剑 2016-03-03
  • 打赏
  • 举报
回复
判断多个点和判断一个点是同样的原理呀,这个问题就是判断一个点是否在多边形内,可以通过射线法来判断,网上有很多的。

19,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧