本文整理汇总了C++中Poly::getPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Poly::getPoint方法的具体用法?C++ Poly::getPoint怎么用?C++ Poly::getPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poly
的用法示例。
在下文中一共展示了Poly::getPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addPoly
void Polygroup::addPoly(const Poly& poly)
{
bool add(true);
int polyX(poly.getPoint(0).x), polyZ(poly.getPoint(0).z);
for(std::vector<Poly>::iterator gridIt(grid[polyX][polyZ].begin());gridIt!=grid[polyX][polyZ].end();++gridIt)
{
if((*gridIt)==poly)
{
add=false;
}
}
if(add){
grid[polyX][polyZ].push_back(poly);
lowEfficientPolys.push_back(poly);
if(!initialSetup)
{
//create a new thread and run the polygon reduction again
}
else
{
highEfficientPolys.push_back(poly);
}
}
}
示例2: removePoly
void Polygroup::removePoly(const Poly& poly)
{
int polyX(poly.getPoint(0).x), polyZ(poly.getPoint(0).z);
//Remove poly from the grid
for(std::vector<Poly>::iterator gridIt(grid[polyX][polyZ].begin());gridIt!=grid[polyX][polyZ].end();++gridIt)
{
if((*gridIt)==poly)
{
grid[polyX][polyZ].erase(gridIt);
}
}
//Remove poly from the low efficiency poly list
for(std::vector<Poly>::iterator lowIt(lowEfficientPolys.begin());lowIt!=lowEfficientPolys.end();++lowIt)
{
if((*lowIt)==poly)
{
lowEfficientPolys.erase(lowIt);
}
}
if(!initialSetup)
{
//create a new thread and run the polygon reduction again
}
}