fix line tessellation, fix #1814

This commit is contained in:
Ansis Brammanis
2015-07-02 13:18:59 +02:00
parent a8f77d23cc
commit 9d714dcf83

View File

@@ -183,8 +183,8 @@ void LineBucket::addGeometry(const std::vector<Coordinate>& vertices) {
} else {
const float direction = prevNormal.x * nextNormal.y - prevNormal.y * nextNormal.x > 0 ? -1 : 1;
const float bevelLength = miterLength * util::mag(prevNormal + nextNormal) /
util::mag(prevNormal - nextNormal * direction);
joinNormal = util::perp(joinNormal) * bevelLength;
util::mag(prevNormal - nextNormal);
joinNormal = util::perp(joinNormal) * bevelLength * direction;
}
addCurrentVertex(currentVertex, flip, distance, joinNormal, 0, 0, false, startVertex,