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

Method getEle

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

Source from the content-addressed store, hash-verified

2611}
2612
2613double ODRoad::getEle(double s) const {
2614 if (elevation.empty()) return 0.0;
2615 size_t index = 0;
2616 for (size_t i = 1; i < elevation.size(); i++) {
2617 if (s < elevation[i].offset()) {
2618 break;
2619 }
2620 index = i;
2621 }
2622 double dis = s - elevation[index].offset();
2623 return elevation[index].value(dis);
2624}
2625
2626void ODRoad::getObjects(std::vector<Object>& objs) const {
2627 auto getP = [&](double s, double t, ODXYZ& P, double& T) {

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
sizeMethod · 0.45
offsetMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected