MCPcopy Create free account
hub / github.com/comaps/comaps / GetNormal

Function GetNormal

libs/drape_frontend/line_shape_helper.cpp:246–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246glsl::vec2 GetNormal(LineSegment const & segment, bool isLeft, ENormalType normalType)
247{
248 if (normalType == BaseNormal)
249 return isLeft ? segment.m_leftBaseNormal : segment.m_rightBaseNormal;
250
251 int const index = (normalType == StartNormal) ? StartPoint : EndPoint;
252 return isLeft ? segment.m_leftWidthScalar[index].x * segment.m_leftNormals[index]
253 : segment.m_rightWidthScalar[index].x * segment.m_rightNormals[index];
254}
255
256float GetProjectionLength(glsl::vec2 const & newPoint, glsl::vec2 const & startPoint, glsl::vec2 const & endPoint)
257{

Callers 3

PrepareGeometryMethod · 0.85
PrepareArrowGeometryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected