Iteratively check hit. Once there's a hit, only keep the segment from the start point to the hit.
CGAL::collinear_are_ordered_along_line is a predicate that checks if 3 points are colinear floor_to_double is a useful function to convert type in CGAL