Created a total_lengt() free function for Polygons and Polylines.

Modified the "extra perimeters when needed" function to use the new free functions,
extended the tooltip of the "extra perimeters when needed" feature.
This commit is contained in:
bubnikv 2017-02-02 16:03:32 +01:00
parent c25ae35737
commit 4256af22ff
4 changed files with 18 additions and 11 deletions

View file

@ -69,6 +69,13 @@ public:
extern BoundingBox get_extents(const Polyline &polyline);
extern BoundingBox get_extents(const Polylines &polylines);
inline double total_length(const Polylines &polylines) {
double total = 0;
for (Polylines::const_iterator it = polylines.begin(); it != polylines.end(); ++it)
total += it->length();
return total;
}
inline Lines to_lines(const Polyline &poly)
{
Lines lines;