We now test the midpoint (B) of the 3 consecutive polyline points (A, B, C), since (assuming the angle between AB and BC is > 90 degrees) AC is always longer than
AB or BC. This minimizes the distance computation rounding error (in the previous algorithm, taking the point C for colineraity test) if AB is short and BC is very long, the test would
often fail due to rouding error in projection/line distance computation
(cherry picked from commit
|
||
---|---|---|
.. | ||
circle.cpp | ||
convex_hull.cpp | ||
direction_45.cpp | ||
geometry_utils.cpp | ||
poly_grid_partition.cpp | ||
seg.cpp | ||
shape.cpp | ||
shape_arc.cpp | ||
shape_collisions.cpp | ||
shape_compound.cpp | ||
shape_file_io.cpp | ||
shape_line_chain.cpp | ||
shape_poly_set.cpp | ||
shape_rect.cpp | ||
shape_segment.cpp |