91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

C++ CImage類,用于處理BMP格式圖像。

資源截圖

代碼片段和文件信息

//?Image.cpp:?implementation?of?the?CImage?class.
//
//////////////////////////////////////////////////////////////////////

#include?“stdafx.h“

#include?“Image.h“
#include?“math.h“
#include?
using?namespace?std;
#define?PI?3.1415926535897932384626433832795
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
/*功能:判斷點(diǎn)是否在多邊形內(nèi)
?*方法:求解通過該點(diǎn)的水平線與多邊形各邊的交點(diǎn)
?*結(jié)論:單邊交點(diǎn)為奇數(shù),在多邊形內(nèi)
?*point?指定的點(diǎn)
?*Polygon多邊形各頂點(diǎn)坐標(biāo)
?*nCount多邊形頂點(diǎn)個(gè)數(shù)
?*/
BOOL?PointInPolygon(CPoint?pointvectorPolygonint?nCount)
{
int?nCross=0;

for(int?i=0;i {
CPoint?p1=Polygon[i];
CPoint?p2=Polygon[(i+1)%nCount];

//求解y=p.y與p1p2的交點(diǎn)

if?(p1.y==p2.y)//p1p2?與y=p.y平行
continue;

if(point.y con

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-05-09?20:19??CImage\
?????文件???????36672??2013-07-11?22:45??CImage\Image.cpp
?????文件????????3322??2013-07-11?22:44??CImage\Image.h

評論

共有 條評論