本文整理汇总了C++中CCurve::PerimToPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ CCurve::PerimToPoint方法的具体用法?C++ CCurve::PerimToPoint怎么用?C++ CCurve::PerimToPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCurve
的用法示例。
在下文中一共展示了CCurve::PerimToPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsideCurves
void CArea::InsideCurves(const CCurve& curve, std::list<CCurve> &curves_inside)const
{
//1. find the intersectionpoints between these two curves.
std::list<Point> pts;
CurveIntersections(curve, pts);
//2.seperate curve2 in multiple curves between these intersections.
std::list<CCurve> separate_curves;
curve.ExtractSeparateCurves(pts, separate_curves);
//3. if the midpoint of a seperate curve lies in a1, then we return it.
for(std::list<CCurve>::iterator It = separate_curves.begin(); It != separate_curves.end(); It++)
{
CCurve &curve = *It;
double length = curve.Perim();
Point mid_point = curve.PerimToPoint(length * 0.5);
if(IsInside(mid_point, *this))curves_inside.push_back(curve);
}
}