mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-29 07:32:17 +00:00
[strategies] Add ctors, store substrategy and propagate radius in distance segment/box strategy.
This commit is contained in:
@@ -224,9 +224,9 @@ struct spherical_segment_box
|
||||
typedef Strategy type;
|
||||
};
|
||||
|
||||
inline typename distance_pp_strategy::type get_distance_pp_strategy() const
|
||||
inline Strategy get_distance_pp_strategy() const
|
||||
{
|
||||
return typename distance_pp_strategy::type();
|
||||
return m_strategy;
|
||||
}
|
||||
// point-segment strategy getters
|
||||
struct distance_ps_strategy
|
||||
@@ -236,7 +236,7 @@ struct spherical_segment_box
|
||||
|
||||
inline typename distance_ps_strategy::type get_distance_ps_strategy() const
|
||||
{
|
||||
return typename distance_ps_strategy::type();
|
||||
return typename distance_ps_strategy::type(m_strategy.radius());
|
||||
}
|
||||
|
||||
struct distance_pb_strategy
|
||||
@@ -246,7 +246,7 @@ struct spherical_segment_box
|
||||
|
||||
inline typename distance_pb_strategy::type get_distance_pb_strategy() const
|
||||
{
|
||||
return typename distance_pb_strategy::type();
|
||||
return typename distance_pb_strategy::type(m_strategy.radius());
|
||||
}
|
||||
|
||||
// TODO: why is the Radius not propagated above?
|
||||
@@ -265,6 +265,19 @@ struct spherical_segment_box
|
||||
return equals_point_point_strategy_type();
|
||||
}
|
||||
|
||||
// constructors
|
||||
|
||||
inline spherical_segment_box()
|
||||
{}
|
||||
|
||||
explicit inline spherical_segment_box(typename Strategy::radius_type const& r)
|
||||
: m_strategy(r)
|
||||
{}
|
||||
|
||||
inline spherical_segment_box(Strategy const& s)
|
||||
: m_strategy(s)
|
||||
{}
|
||||
|
||||
// methods
|
||||
|
||||
template <typename LessEqual, typename ReturnType,
|
||||
@@ -309,6 +322,8 @@ struct spherical_segment_box
|
||||
top_left, top_right);
|
||||
}
|
||||
|
||||
private:
|
||||
Strategy m_strategy;
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
Reference in New Issue
Block a user