本文整理汇总了C++中PointList::push_front方法的典型用法代码示例。如果您正苦于以下问题:C++ PointList::push_front方法的具体用法?C++ PointList::push_front怎么用?C++ PointList::push_front使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointList
的用法示例。
在下文中一共展示了PointList::push_front方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parsePointList
void LocationParser_ns::parsePointList(PointList &list) {
debugC(5, kDebugParser, "parsePointList()");
_script->readLineToken(true);
while (scumm_stricmp(_tokens[0], "ENDNODES")) {
if (!scumm_stricmp(_tokens[0], "COORD")) {
list.push_front(Common::Point(atoi(_tokens[1]), atoi(_tokens[2])));
}
_script->readLineToken(true);
}
debugC(5, kDebugParser, "parsePointList() done");
return;
}
示例2: FirstPoint
//.........这里部分代码省略.........
case 1 :
{
NewPoint.x++;
NewPoint.y++;
}
break;
case 2 : NewPoint.y++; break;
case 3 :
{
NewPoint.x--;
NewPoint.y++;
}
break;
case 4 : NewPoint.x--; break;
case 5 :
{
NewPoint.x--;
NewPoint.y--;
}
break;
case 6 : NewPoint.y--; break;
case 7 :
{
NewPoint.x++;
NewPoint.y--;
}
break;
} // fin switch
utls::BAry::value v = Image->el[NewPoint.y][NewPoint.x];
if (v == 0) NbZero++;
if (v == MARKED_PIXEL) NbMoinsUn++;
if (v == 255)
{
ListePointContour->push_front(NewPoint);
CurrentPoint = NewPoint;
CandidatTrouve = true;
Image->el[NewPoint.y][NewPoint.x] = MARKED_PIXEL;
if(CurrentPoint == FirstPoint)
{
Image->el[FirstPoint.y][FirstPoint.x] = MARKED_PIXEL;
ConditionArret = false; //on sort si la tete = la queue
Rebouclage = true; // pas la peine de traiter la connexité
}
bFinFreeman=true; // pas la peine de continuer
}
else// si on a pas trouvé de point blanc
{
if(CodeFreeman == 7)// et qu'on a balayé tous les freemans alors on sort
{
if(BoolRetour)
ConditionArret = false;
else
{
if(ListePointContour->size() > 1)
{
BoolRetour=true;
Image->el[CurrentPoint.y][CurrentPoint.x] = MARKED_PIXEL;
PointList::iterator PositionQueue = ListePointContour->begin();
PositionQueue++;
CurrentPoint = *PositionQueue;
CodeFreeman = -1;
NbZero=0;
NbMoinsUn=0;
}
else
ConditionArret = false;