Tweak - do intersection testing radius enlargement before applying transformation
@@ -1226,12 +1226,12 @@ namespace carto { namespace vt {
std::size_t binormalOffset = index * geometryLayoutParams.vertexSize + geometryLayoutParams.binormalOffset;
const short* binormalPtr = reinterpret_cast<const short*>(&geometry->getVertexGeometry()[binormalOffset]);
cglib::vec2<float> xy = cglib::vec2<float>(binormalPtr[0], binormalPtr[1]) * (1.0f / geometryLayoutParams.binormalScale);
- if (geometry->getStyleParameters().transform) {
- xy = cglib::transform_point(xy, geometry->getStyleParameters().transform.get());
- }
if (cglib::length(xy) != 0) {
xy = xy * (1.0f + radius / cglib::length(xy));
}
+ if (geometry->getStyleParameters().transform) {
+ xy = cglib::transform_point(xy, geometry->getStyleParameters().transform.get());
+ }
return (xAxis * xy(0) + yAxis * xy(1)) * (geometry->getGeometryScale() / geometry->getTileSize());
}
