mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-10 23:42:12 +00:00
Merge pull request #51 from mkaravel/feature/distance-default-strategy
Feature/distance default strategy
This commit is contained in:
@@ -251,6 +251,20 @@ struct default_strategy
|
||||
> type;
|
||||
};
|
||||
|
||||
template <typename PointOfSegment, typename Point, typename Strategy>
|
||||
struct default_strategy
|
||||
<
|
||||
segment_tag, point_tag, PointOfSegment, Point,
|
||||
cartesian_tag, cartesian_tag, Strategy
|
||||
>
|
||||
{
|
||||
typedef typename default_strategy
|
||||
<
|
||||
point_tag, segment_tag, Point, PointOfSegment,
|
||||
cartesian_tag, cartesian_tag, Strategy
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
@@ -322,6 +322,18 @@ struct default_strategy
|
||||
typedef pythagoras_point_box<> type;
|
||||
};
|
||||
|
||||
template <typename BoxPoint, typename Point>
|
||||
struct default_strategy
|
||||
<
|
||||
box_tag, point_tag, BoxPoint, Point, cartesian_tag, cartesian_tag
|
||||
>
|
||||
{
|
||||
typedef typename default_strategy
|
||||
<
|
||||
point_tag, box_tag, Point, BoxPoint, cartesian_tag, cartesian_tag
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
@@ -306,6 +306,22 @@ struct default_strategy
|
||||
};
|
||||
|
||||
|
||||
template <typename PointOfSegment, typename Point, typename Strategy>
|
||||
struct default_strategy
|
||||
<
|
||||
segment_tag, point_tag, PointOfSegment, Point,
|
||||
spherical_equatorial_tag, spherical_equatorial_tag,
|
||||
Strategy
|
||||
>
|
||||
{
|
||||
typedef typename default_strategy
|
||||
<
|
||||
point_tag, segment_tag, Point, PointOfSegment,
|
||||
spherical_equatorial_tag, spherical_equatorial_tag,
|
||||
Strategy
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
@@ -68,6 +68,11 @@ void test_distance(
|
||||
<
|
||||
bg::point_tag, bg::segment_tag, Point, Point
|
||||
>::type cross_track_strategy_type;
|
||||
|
||||
typedef typename bg::strategy::distance::services::default_strategy
|
||||
<
|
||||
bg::segment_tag, bg::point_tag, Point, Point
|
||||
>::type reversed_tags_cross_track_strategy_type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ void test_services()
|
||||
<
|
||||
bg::point_tag, bg::segment_tag, P, PS
|
||||
>::type projected_point_strategy_type;
|
||||
|
||||
typedef typename services::default_strategy
|
||||
<
|
||||
bg::segment_tag, bg::point_tag, PS, P
|
||||
>::type reversed_tags_projected_point_strategy_type;
|
||||
}
|
||||
|
||||
// 1: normal, calculate distance:
|
||||
|
||||
Reference in New Issue
Block a user