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

Method getRefGeo

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

Source from the content-addressed store, hash-verified

2577}
2578
2579const ODGeomPtr ODRoad::getRefGeo(double s) const {
2580 if (ref_line.empty()) {
2581 return ODGeomPtr(nullptr);
2582 }
2583 for (const auto& _geom_ptr : ref_line) {
2584 if (s < (_geom_ptr->offset() + _geom_ptr->length())) {
2585 return _geom_ptr;
2586 }
2587 }
2588 return ref_line.back();
2589}
2590
2591void ODRoad::roadGeom(double s, double& x, double& y) const {
2592 auto _geom_ptr = getRefGeo(s);

Callers

nothing calls this directly

Calls 4

backMethod · 0.80
emptyMethod · 0.45
offsetMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected