上传者: wfywangfeiyao
|
上传时间: 2021-04-14 11:00:32
|
文件大小: 3KB
|
文件类型: CPP
计算任意多边形和矩形的交点
//the input rectClip must have been NormalizeRect().
// CRect rectClip(m_ptnOrign, m_ptnPre);
// rectClip.NormalizeRect();
void CheckPolygonClip(const vector &polygon,
vector &vSidePoints, const CRect& rectClip)
{
if(polygon.size()<3) //at least three points
return;
vector vInputPos;
vector vOutputPos;
vInputPos.resize(polygon.size());