|
Boost Users : |
Subject: [Boost-users] measuring distance between a point and a segment
From: Juliette Pera (juliette.pera_at_[hidden])
Date: 2016-04-20 09:46:09
Dear all,
I am currently trying to use the boost library in order to measure the
shortest distance between a point and a list of segments.
I am declaring a segment to which I append the two points of my segment and
the I calculate the distance from my point P to the segment.
xsegment_t segment;
geom::append(segment,geom::make_point(A[0],A[1]));
geom::append(segment,geom::make_point(B[0],B[1]));
double distance2 = geom::distance(segment,geom::make_point(P[0],P[1]));
The issue is that I measure every time the same distance even if the
segment is different.
Does anyone knows from where that issue can come from?
Thank you in advance,
Juliette Pera
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