|
Geometry : |
Subject: [ggl] RE: A few Boost.Geometry questions
From: Bruno Lalande (bruno.lalande)
Date: 2010-09-30 10:18:02
Hi Bill,
> How do we access the z-coordinate information in
> "template?<>?struct?access<Point,?2>"?
Sorry for the late reply... I've thought about that and it seems that
there's no simple solution. I think you will basically have to create
an iterator type (the type returned by range functions like begin(),
end()) that holds a reference to your GeometryPath. Then create a
proxy of point that this iterator will return when dereferenced (so in
its operator*()), instead of returning an actual point. This is a
commonly used technique. The iterator is obviously responsible for
initializing this fake point with references to the right coordinates
in your geometry path. And you wouldn't adapt your Point class anymore
but the proxy point in question (unless you still need to adapt Point
for other purposes).
Regards
Bruno
Geometry list run by mateusz at loskot.net