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

Method getNormal

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

Source from the content-addressed store, hash-verified

586}
587
588void ODGeometry::getNormal(std::vector<std::pair<double, double>>& normals) const {
589 if (length() < 1e-6) {
590 return;
591 }
592 getTangent(normals);
593 for (auto& _np : normals) {
594 std::swap(_np.first, _np.second);
595 _np.second *= -1;
596 }
597}
598
599void ODGeometry::getNormal(double s, double& x, double& y) const {
600 double alpha = getHeading(s) + pi * 0.5;

Callers 1

roadNormalMethod · 0.80

Calls 2

swapFunction · 0.85
lengthFunction · 0.50

Tested by

no test coverage detected