Boost logo

Boost Users :

Subject: Re: [Boost-users] [geometry][ggl] boost array adapted mechanism
From: Barend Gehrels (barend_at_[hidden])
Date: 2010-10-27 04:15:55


  hi Alfredo,

> The documentation of GGL (Generic Geometry Library) is still scattered
> and hard to follow.

We are working on it. It is being written using QuickBook, and it will
be within Boost.

> As usual the first test I do on a library is to
> see how well it can be adapted to existing code. GGL seems to be able
> to adapt c_arrays and tuples as nD points.

Yes.

> I was wondering if
> boost::array and fusion::vector can be adapted as well.

Boost Array can be adapted as a linear ring or as a linestring, both
with a fixed number of coordinates. Boost Array cannot yet be adapted as
a point, which is actually not complex and a good idea.

Fusion, I started it once but continued with other things... So not yet
there indeed.

> boost::array<double, 3> p4={{10,11,12}};
>
> In other words, why there is not
> boost/geometry/geometries/adapted/boost_array_cartesian.hpp
> ?

Yes, not yet there and it is a good idea.

> And it indeed this adaptation of boost::array is not included in the
> library, what steps should I follow to make a boost::array adapted to
> GGL?

Adapting to the Point Concept is necessary, which is actually not hard.
Most samples use registration macro's, which is probably not possible
here. So perhaps the c05_custom_point_pointer_example.cpp gives the
idea. Basically you have to specialize the tag, coordinate_type,
coordinate_system, dimension metafunctions (all trivial) and the access
structure, also not too hard.

In case you start with this, I'm interested in the result, for
incorporation. Otherwise it will probably be included as well but then
it might take longer.

Good point.

Regards, Barend


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net