Boost logo

Boost :

Subject: Re: [boost] Proposal/InterestCheck: Boost.Geom
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2009-01-30 05:34:24


>>>> So this works as well:
>>>> int box[4] = {1,1,10,10};
>>>> int c[2] = {5, 5};
>>>> bool is_inside = geometry::within(c, box);
>>> So an int[4] is a 2D box and an int[2] is a 2D point?
>>> That looks like quite some arbitrary choices...
> True. I said somewhere else: "That is implemented through metafunctions
> somewhere else". I didn't explain because there are some options there:
> - you can include a headerfile registering a c-array as a point
> - OR you can include a headerfile registering a c-array as a box (one of the
> two, there is a guard to avoid ambuigity).
> - OR a segment
> - alternatively you can implement manually traits classes to define that the
> c-array is like a point, or like a box, or a segment
> - alternatively you can call a macro which is just a macro-shortcut for the
> traits classes. There are a couple of them, for 2D point, 3D point, box, ...

To make it clear for Boost users, it's the same approach as for the
"adapted" stuff of Boost.Fusion, where by including for instance
<boost/fusion/adapted/std_pair.hpp>, you *can* have pairs seen as a
sequence. If you don't want to, just don't include that. It's a same
principle in the Geometry Library.


Boost list run by bdawes at, gregod at, cpdaniel at, john at