Boost logo

Geometry :

Subject: Re: [geometry] nsphere and views names
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2013-06-22 09:48:24


I basically agree with the propositions discussed here. Regarding the
pipe-style syntax - it's just an extra layer on top of the classic syntax
we've already started (view_as / make_view_as etc...) so let's first
finalize it and document it, then we can discuss more in detail what a
higher level syntax would look like.

My only concern is to produce unexpected and/or counterintuitive effects.
"view_as<some geometry>" should always be an "exact" operation. That is, it
should always return a geometry which is the exact equivalent of the input
geometry (i.e. calling any algorithm on it should return the same result).
For instance a 2D box can be exactly expressed in terms of a 2D polygon, a
point can be exactly expressed in terms of a box (with null dimensions) so
these are good uses. However, saying view_as<point>(sphere) and expecting
it to return the center of the sphere is an abuse, the returned geometry is
not geometrically equivalent to what we had in the first place. So that
should be achieved by a more explicit call, for instance
view_as_center<point>(sphere). I want to avoid obscure behaviors, basically.


Geometry list run by mateusz at