本文整理汇总了C++中MapLine::doubleSector方法的典型用法代码示例。如果您正苦于以下问题:C++ MapLine::doubleSector方法的具体用法?C++ MapLine::doubleSector怎么用?C++ MapLine::doubleSector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapLine
的用法示例。
在下文中一共展示了MapLine::doubleSector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openSector
void PolygonSplitter::openSector(MapSector* sector)
{
// Check sector was given
if (!sector)
return;
// Init
clear();
// Get list of sides connected to this sector
vector<MapSide*>& sides = sector->connectedSides();
// Go through sides
MapLine* line;
for (unsigned a = 0; a < sides.size(); a++)
{
line = sides[a]->getParentLine();
// Ignore this side if its parent line has the same sector on both sides
if (!line || line->doubleSector())
continue;
// Add the edge to the splitter (direction depends on what side of the line this is)
if (line->s1() == sides[a])
addEdge(line->v1()->xPos(), line->v1()->yPos(), line->v2()->xPos(), line->v2()->yPos());
else
addEdge(line->v2()->xPos(), line->v2()->yPos(), line->v1()->xPos(), line->v1()->yPos());
}
}