Boost logo

Boost :

From: Îâ»Æ (hfutwuhuang_at_[hidden])
Date: 2008-01-14 20:12:22




------------------
Îâ»Æ
2008-01-15

-------------------------------------------------------------
·¢¼þÈË£ºBarend Gehrels
·¢ËÍÈÕÆÚ£º2008-01-14 21:36:12
ÊÕ¼þÈË£º
³­ËÍ£º
Ö÷Ì⣺[boost] Is there any interest in a template geometry library?

Hi,

Is there any interest in a template geometry library?

I am a Chinese graduate student majoring CAD/CG in Hefei University of Technology, and I'm very interest in the template geometry library.

The library we are developing is basic 2D geometry library. In this
library, data structures are small and simple (but polygons can still
have holes). Nevertheless, the library provides a lot of useful
algorithms such as point-in-polygon, line intersections and polygon
clipping.

We at Geodan are developing our library since 1995, and recently
restructured, simplified and enhanced the geometry core. Now that it is
clean and well designed, and still with years of experience, we aim to
publish it in Boost under the Boost Software License.

How about is your experience now? How long to publish the library? I want to have a sight on the library as soon as possible.

To give some impressions, points are like this:
template <typename T> class point {
(...)
inline const T& x() const (...)
inline const T& y() const (...)
};

and lines are completely empty, like this:
template <typename P>
class linestring : public std::vector<P> { };
(Besides that you can also specify another container).

Data and algorithms are separated,

Why not to put the data and algorithms together for encapsulation? Because I think the parameter type which algorithm operates is very limited, not generic, just one or two.

so there are algorithms like:
template <typename P, typename POL>
bool point_in_polygon(const P& p, const POL& pol);

and like this:
template <typename S1, typename S2, typename MP>
intersection_result intersection_segment(const S1& segment1, const S2&
segment2, MP& multipoint);

but also generic wrappers like a "within" algorithm which is defined for
all relevant geometry types
template <typename P1, typename P2>
inline bool within(const P& p, const polygon<P2>& poly)
Because the library is completely templatized, you can use your own
geometry types, and/or container types (provided that they follow the
basic interface).

The library follows std:: and boost:: standards and conventions, as well
as the OGC (The Consortium on Standards in Geographical Information
Systems) conventions.

I know there have been discussions before on geometry libraries and on
CGAL, e.g. http://lists.boost.org/Archives/boost/2007/03/117582.php. We
are using boost in our library since about 2000.

Where could i get the library and documentation from?

If there is interest I will complete the documentation and examples
according to Boost standards, and prepare a submission.

Barend Gehrels

-------------------------------------
Barend Gehrels
-------------------------------------
Geodan Holding b.v.
President Kennedylaan 1
1079 MB Amsterdam, the Netherlands
-------------------------------------
E-mail: barend.gehrels_at_[hidden]
Website: www.geodan.nl
-------------------------------------



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk