MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / drawPolyline

Method drawPolyline

CesiumVectorData/src/VectorRasterizer.cpp:252–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void VectorRasterizer::drawPolyline(
253 const std::vector<glm::dvec3>& points,
254 const LineStyle& style) {
255 if (this->_finalized) {
256 return;
257 }
258
259 std::vector<BLPoint> vertices;
260 vertices.reserve(points.size());
261
262 for (const glm::dvec3& vertex : points) {
263 BLPoint point = radiansToPoint(
264 CesiumUtility::Math::degreesToRadians(vertex.x),
265 CesiumUtility::Math::degreesToRadians(vertex.y),
266 this->_bounds,
267 this->_context);
268 vertices.emplace_back(point);
269 }
270
271 setStrokeWidth(this->_context, style, this->_ellipsoid, this->_bounds);
272
273 this->_context.strokePolyline(
274 vertices.data(),
275 vertices.size(),
276 BLRgba32(style.getColor(seedForObject(points, 31)).toRgba32()));
277}
278
279void VectorRasterizer::drawPolyline(
280 const std::vector<CesiumGeospatial::Cartographic>& points,

Callers 3

operator()Method · 0.80

Calls 8

radiansToPointFunction · 0.85
degreesToRadiansFunction · 0.85
setStrokeWidthFunction · 0.85
seedForObjectFunction · 0.85
toRgba32Method · 0.80
getColorMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected