怎么判断一个不规则图形 包含某一点啊

ning218 2013-11-06 01:38:54
加精
已经知道该不规则图形的中心点 具体怎么判断
...全文
6242 30 打赏 收藏 转发到动态 举报
写回复
用AI写文章
30 条回复
切换为时间正序
请发表友善的回复…
发表回复
yhqly 2016-05-16
  • 打赏
  • 举报
回复
GDI+有相关函数可以判断,graphicspath。
niyu0928 2016-03-29
  • 打赏
  • 举报
回复
好厉害的样子!!
盈一水妞盈 2016-03-29
  • 打赏
  • 举报
回复
百度开放云?……额,还有什么是我不知道的?百度云你还好么?
的分痛苦 2016-03-29
  • 打赏
  • 举报
回复
我觉得如果我开个赌注,这个愚人节我可能会成为百万富翁!
腾逯登 2016-03-29
  • 打赏
  • 举报
回复
真的会在愚人节有活动么??又来这招?!
duoyuanqn994 2016-03-29
  • 打赏
  • 举报
回复
是谁说,那个夏天,云开了……百度开放云,开发者的云梦之乡~~
华贵或贱卑 2016-03-29
  • 打赏
  • 举报
回复
快!这个愚人节,把你的黑科技亮出来!
赵4老师 2016-03-29
  • 打赏
  • 举报
回复
引用 16 楼 modyaj 的回复:
当CSDN的看客们都一波又一波的走了,只有赵老师还是一如既往的坚挺!很久没逛CSDN了,依然还能看到老赵如此活跃,小生佩服!!!!!!!!!! [quote=引用 2 楼 zhao4zhong1 的回复:] 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
[/quote]
qq_33564313 2016-03-28
  • 打赏
  • 举报
回复
http://edu.csdn.net/app
mutouan 2016-03-26
  • 打赏
  • 举报
回复
大家好厉害 小白一个 很受用
cattpon 2016-03-26
  • 打赏
  • 举报
回复
learning~
modyaj 2016-03-26
  • 打赏
  • 举报
回复
当CSDN的看客们都一波又一波的走了,只有赵老师还是一如既往的坚挺!很久没逛CSDN了,依然还能看到老赵如此活跃,小生佩服!!!!!!!!!!
引用 2 楼 zhao4zhong1 的回复:
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
phantomhades 2016-03-26
  • 打赏
  • 举报
回复
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
regainworld 2014-03-28
  • 打赏
  • 举报
回复
用射线法 以点p为端点,向左方做射线L,沿L向无穷远处移动,求与多边形各边和顶点是否相交: 1、L和顶点相交,若此顶点的两条边在L两侧,交点算一个;若在L同侧,则交点算0个; 2、L和某条边重合,交点算0个; 交点总数为奇数时,P在多边形内;偶数时,P在多边形外;
蓝色的杯子 2014-03-27
  • 打赏
  • 举报
回复
我以前是这样写的 目标点的 水平线和 所有可能的顶点组成的线的x交点, 没有的话在外, 有的话x需要有大于目标的x,和小于目标的x. 但这样保证多边形为 凸, BOOL PtInRegion 真没用过
赵4老师 2014-03-06
  • 打赏
  • 举报
回复
引用 2 楼 zhao4zhong1 的回复:
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
正解!
GIS小鸟 2014-03-06
  • 打赏
  • 举报
回复
把这个多边形分解成N个三角形,然后判断改点有没有在这些三角形内!
DeDeWo 2013-12-13
  • 打赏
  • 举报
回复
CUMTB_huitailang 2013-12-11
  • 打赏
  • 举报
回复
还有一个条件,那就是夹角应该小于180°
加载更多回复(7)

5,531

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 模式及实现
社区管理员
  • 模式及实现社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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