Subject: [ggl] combine
From: Barend Gehrels (barend)
Date: 2011-03-29 08:47:54
Herewith something on this older message:
On 27-2-2011 19:00, Adam Wulkiewicz wrote:
>>> Personally, I'd like to have simply
>>> void expand(Box&, Geometry const&)
Done (some weeks ago)
> Btw, to be completly honest, intersection_inserter should be the name
> of an object, not function. Function's name should be the verb:
> intersection_insert(red, blue, std::back_inserter(output));
> // or some similar name e.g. intersection_copy
> or e.g.
> ); // push back the intersection of all geometries in range
> but (for inserter)
> // just an example
> std::vector<std::pair<Geometry1, Geometry2> > g_pairs;
> std::vector<Intersection> g_intersections;
> // push back intersections of pairs of geometries
> What do you think?
I agree, it is confusing.
So everybody agrees on this last moment renaming "inserter" to "insert" ?
And "make_" is also not OK with this respect. "The types for the pair
class are implicitly deduced from the arguments passed to make_pair."
While that type with make_centroid (and others), on the contrary is
1) centroid(polygon, p)
2) p = <PointType>make_centroid(polygon)
It might be renamed to return_centroid, so
2) p = return_centroid<PointType>(polygon).
Renaming is probably much better and still possible (but not for long
Geometry list run by mateusz at loskot.net