Subject: [ggl] Clipping/Intersecting efficiency
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-05-31 05:02:31
> Thanks for this, it would already be half the problem gone. If you
> could commit this to the sandbox, it would be great.
> In this case, what should be defined as a point_2d? point*, right?
Not point* but probably just "point" in your case? It should not be
dynamic to avoid the same problems. If your "point" is not registered
you can register it in the same way (without *).
Just looked into the Merkaartor sources. I would advice to register
QPointF as being recognized by the GGL. You can then define a linestring
of QPointF's and no further conversions are necessary. So something like:
GEOMETRY_REGISTER_POINT_2D_GET_SET(QPointF, qreal, cs::cartesian, x, y,
and then ggl::linestring<QPointF> can be used, so your clip should look
like (didn't test):
typedef ggl::linestring<QPointF> q_line;
in, std::back_inserter(clipped), strategy);
You can, by the way, also register QRect as a box type.
However, I didn't see a point* in your source so maybe I looked at the
-------------- next part --------------
An HTML attachment was scrubbed...
Geometry list run by mateusz at loskot.net