12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_RESULT_HPP
- #define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_RESULT_HPP
- #include <cstddef>
- #include <boost/geometry/core/coordinate_type.hpp>
- #include <boost/geometry/policies/robustness/segment_ratio.hpp>
- namespace boost { namespace geometry
- {
- template <typename SegmentRatio>
- struct fraction_type
- {
- SegmentRatio robust_ra;
- SegmentRatio robust_rb;
- bool initialized;
- inline fraction_type()
- : initialized(false)
- {}
- template <typename Info>
- inline void assign(Info const& info)
- {
- initialized = true;
- robust_ra = info.robust_ra;
- robust_rb = info.robust_rb;
- }
- inline void assign(SegmentRatio const& a, SegmentRatio const& b)
- {
- initialized = true;
- robust_ra = a;
- robust_rb = b;
- }
- };
- template
- <
- typename Point,
- typename SegmentRatio = segment_ratio<typename coordinate_type<Point>::type>
- >
- struct segment_intersection_points
- {
- std::size_t count;
-
- Point intersections[2];
- fraction_type<SegmentRatio> fractions[2];
- typedef Point point_type;
- segment_intersection_points()
- : count(0)
- {}
- };
- }}
- #endif
|