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

Function GenerateArrowsTriangles

libs/drape_frontend/route_shape.cpp:124–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void GenerateArrowsTriangles(glsl::vec4 const & pivot, std::vector<glsl::vec2> const & normals,
125 m2::RectF const & texRect, std::vector<glsl::vec2> const & uv, bool normalizedUV,
126 RouteShape::ArrowGeometryBuffer & joinsGeometry)
127{
128 size_t const trianglesCount = normals.size() / 3;
129 for (size_t j = 0; j < trianglesCount; j++)
130 {
131 joinsGeometry.emplace_back(pivot, normals[3 * j], normalizedUV ? GetUV(texRect, uv[3 * j]) : uv[3 * j]);
132 joinsGeometry.emplace_back(pivot, normals[3 * j + 1], normalizedUV ? GetUV(texRect, uv[3 * j + 1]) : uv[3 * j + 1]);
133 joinsGeometry.emplace_back(pivot, normals[3 * j + 2], normalizedUV ? GetUV(texRect, uv[3 * j + 2]) : uv[3 * j + 2]);
134 }
135}
136
137glsl::vec3 MarkerNormal(float x, float y, float z, float cosAngle, float sinAngle)
138{

Callers 1

PrepareArrowGeometryMethod · 0.85

Calls 3

GetUVFunction · 0.85
sizeMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected