MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / roadInterval

Method roadInterval

common/map_sdk/map_import/src/OpenDriveStruct.cpp:2164–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2162}
2163
2164void ODRoad::roadInterval(std::vector<double>& interval) const {
2165 interval.clear();
2166
2167 for (auto& _geom_ptr : ref_line) {
2168 std::vector<double> _cur_interval;
2169 _geom_ptr->getInterval(_cur_interval);
2170 if (_cur_interval.empty()) {
2171 continue;
2172 }
2173 for (auto& v : _cur_interval) v += _geom_ptr->offset();
2174
2175 if (interval.empty()) {
2176 interval.insert(interval.end(), _cur_interval.begin(), _cur_interval.end());
2177 } else {
2178 interval.insert(interval.end(), _cur_interval.begin() + 1, _cur_interval.end());
2179 }
2180 }
2181}
2182
2183void ODRoad::roadCurvature(std::vector<double>& startx, std::vector<double>& length, std::vector<double>& radios) {
2184 startx.clear();

Callers 1

DoRoadMethod · 0.80

Calls 7

getIntervalMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45
offsetMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected