1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_RESULT_HPP
- #define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_RESULT_HPP
- #if defined(HAVE_MATRIX_AS_STRING)
- #include <string>
- #endif
- #include <cstddef>
- 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>
- 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)
- {}
- };
- template <typename CoordinateType, typename PromotedType, typename SegmentRatio>
- struct segment_intersection_info
- {
- typedef PromotedType promoted_type;
- CoordinateType dx_a, dy_a;
- CoordinateType dx_b, dy_b;
- SegmentRatio robust_ra;
- SegmentRatio robust_rb;
- };
- }}
- #endif
|