本文整理汇总了C++中NBEdge::getEndOffset方法的典型用法代码示例。如果您正苦于以下问题:C++ NBEdge::getEndOffset方法的具体用法?C++ NBEdge::getEndOffset怎么用?C++ NBEdge::getEndOffset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NBEdge
的用法示例。
在下文中一共展示了NBEdge::getEndOffset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessError
//.........这里部分代码省略.........
nbe->addLane2LaneConnection(
fromLaneIndex, toEdge, c.toLaneIdx, NBEdge::L2L_VALIDATED,
true, c.mayDefinitelyPass, c.keepClear, c.contPos);
// maybe we have a tls-controlled connection
if (c.tlID != "" && myRailSignals.count(c.tlID) == 0) {
const std::map<std::string, NBTrafficLightDefinition*>& programs = myTLLCont.getPrograms(c.tlID);
if (programs.size() > 0) {
std::map<std::string, NBTrafficLightDefinition*>::const_iterator it;
for (it = programs.begin(); it != programs.end(); it++) {
NBLoadedSUMOTLDef* tlDef = dynamic_cast<NBLoadedSUMOTLDef*>(it->second);
if (tlDef) {
tlDef->addConnection(nbe, toEdge, fromLaneIndex, c.toLaneIdx, c.tlLinkNo);
} else {
throw ProcessError("Corrupt traffic light definition '" + c.tlID + "' (program '" + it->first + "')");
}
}
} else {
WRITE_ERROR("The traffic light '" + c.tlID + "' is not known.");
}
}
}
// allow/disallow XXX preferred
nbe->setPermissions(parseVehicleClasses(lane->allow, lane->disallow), fromLaneIndex);
// width, offset
nbe->setLaneWidth(fromLaneIndex, lane->width);
nbe->setEndOffset(fromLaneIndex, lane->endOffset);
nbe->setSpeed(fromLaneIndex, lane->maxSpeed);
}
nbe->declareConnectionsAsLoaded();
if (!nbe->hasLaneSpecificWidth() && nbe->getLanes()[0].width != NBEdge::UNSPECIFIED_WIDTH) {
nbe->setLaneWidth(-1, nbe->getLaneWidth(0));
}
if (!nbe->hasLaneSpecificEndOffset() && nbe->getEndOffset(0) != NBEdge::UNSPECIFIED_OFFSET) {
nbe->setEndOffset(-1, nbe->getEndOffset(0));
}
}
// insert loaded prohibitions
for (std::vector<Prohibition>::const_iterator it = myProhibitions.begin(); it != myProhibitions.end(); it++) {
NBEdge* prohibitedFrom = myEdges[it->prohibitedFrom]->builtEdge;
NBEdge* prohibitedTo = myEdges[it->prohibitedTo]->builtEdge;
NBEdge* prohibitorFrom = myEdges[it->prohibitorFrom]->builtEdge;
NBEdge* prohibitorTo = myEdges[it->prohibitorTo]->builtEdge;
if (prohibitedFrom == 0) {
WRITE_WARNING("Edge '" + it->prohibitedFrom + "' in prohibition was not built");
} else if (prohibitedTo == 0) {
WRITE_WARNING("Edge '" + it->prohibitedTo + "' in prohibition was not built");
} else if (prohibitorFrom == 0) {
WRITE_WARNING("Edge '" + it->prohibitorFrom + "' in prohibition was not built");
} else if (prohibitorTo == 0) {
WRITE_WARNING("Edge '" + it->prohibitorTo + "' in prohibition was not built");
} else {
NBNode* n = prohibitedFrom->getToNode();
n->addSortedLinkFoes(
NBConnection(prohibitorFrom, prohibitorTo),
NBConnection(prohibitedFrom, prohibitedTo));
}
}
if (!myHaveSeenInternalEdge) {
myNetBuilder.haveLoadedNetworkWithoutInternalEdges();
}
if (oc.isDefault("lefthand")) {
oc.set("lefthand", toString(myAmLefthand));
}
if (oc.isDefault("junctions.corner-detail")) {
oc.set("junctions.corner-detail", toString(myCornerDetail));