diff --git a/include/boost/geometry/algorithms/assign.hpp b/include/boost/geometry/algorithms/assign.hpp index f7b8679f1..32f095b9a 100644 --- a/include/boost/geometry/algorithms/assign.hpp +++ b/include/boost/geometry/algorithms/assign.hpp @@ -124,6 +124,98 @@ inline void assign_zero(Geometry& geometry) >::apply(geometry); } +/*! +\brief Assign two coordinates to a geometry (usually a 2D point) +\ingroup assign +\tparam Geometry \tparam_geometry +\tparam Type \tparam_numeric to specify the coordinates +\param geometry \param_geometry +\param c1 \param_x +\param c2 \param_y + +\qbk{distinguish, 2 coordinate values} +\qbk{ +[heading Example] +[assign_2d_point] [assign_2d_point_output] + +[heading See also] +\* [link geometry.reference.algorithms.make.make_2_2_coordinate_values make] +} + */ +template +inline void assign_values(Geometry& geometry, Type const& c1, Type const& c2) +{ + concept::check(); + + dispatch::assign + < + typename tag::type, + Geometry, + geometry::dimension::type::value + >::apply(geometry, c1, c2); +} + +/*! +\brief Assign three values to a geometry (usually a 3D point) +\ingroup assign +\tparam Geometry \tparam_geometry +\tparam Type \tparam_numeric to specify the coordinates +\param geometry \param_geometry +\param c1 \param_x +\param c2 \param_y +\param c3 \param_z + +\qbk{distinguish, 3 coordinate values} +\qbk{ +[heading Example] +[assign_3d_point] [assign_3d_point_output] + +[heading See also] +\* [link geometry.reference.algorithms.make.make_3_3_coordinate_values make] +} + */ +template +inline void assign_values(Geometry& geometry, + Type const& c1, Type const& c2, Type const& c3) +{ + concept::check(); + + dispatch::assign + < + typename tag::type, + Geometry, + geometry::dimension::type::value + >::apply(geometry, c1, c2, c3); +} + +/*! +\brief Assign four values to a geometry (usually a box or segment) +\ingroup assign +\tparam Geometry \tparam_geometry +\tparam Type \tparam_numeric to specify the coordinates +\param geometry \param_geometry +\param c1 First coordinate (usually x1) +\param c2 Second coordinate (usually y1) +\param c3 Third coordinate (usually x2) +\param c4 Fourth coordinate (usually y2) + +\qbk{distinguish, 4 coordinate values} + */ +template +inline void assign_values(Geometry& geometry, + Type const& c1, Type const& c2, Type const& c3, Type const& c4) +{ + concept::check(); + + dispatch::assign + < + typename tag::type, + Geometry, + geometry::dimension::type::value + >::apply(geometry, c1, c2, c3, c4); +} + + namespace resolve_variant { diff --git a/include/boost/geometry/algorithms/detail/assign_values.hpp b/include/boost/geometry/algorithms/detail/assign_values.hpp index 82dd6bec6..5e4a1795b 100644 --- a/include/boost/geometry/algorithms/detail/assign_values.hpp +++ b/include/boost/geometry/algorithms/detail/assign_values.hpp @@ -331,100 +331,6 @@ struct assign_inverse } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH - -/*! -\brief Assign two coordinates to a geometry (usually a 2D point) -\ingroup assign -\tparam Geometry \tparam_geometry -\tparam Type \tparam_numeric to specify the coordinates -\param geometry \param_geometry -\param c1 \param_x -\param c2 \param_y - -\qbk{distinguish, 2 coordinate values} -\qbk{ -[heading Example] -[assign_2d_point] [assign_2d_point_output] - -[heading See also] -\* [link geometry.reference.algorithms.make.make_2_2_coordinate_values make] -} - */ -template -inline void assign_values(Geometry& geometry, Type const& c1, Type const& c2) -{ - concept::check(); - - dispatch::assign - < - typename tag::type, - Geometry, - geometry::dimension::type::value - >::apply(geometry, c1, c2); -} - -/*! -\brief Assign three values to a geometry (usually a 3D point) -\ingroup assign -\tparam Geometry \tparam_geometry -\tparam Type \tparam_numeric to specify the coordinates -\param geometry \param_geometry -\param c1 \param_x -\param c2 \param_y -\param c3 \param_z - -\qbk{distinguish, 3 coordinate values} -\qbk{ -[heading Example] -[assign_3d_point] [assign_3d_point_output] - -[heading See also] -\* [link geometry.reference.algorithms.make.make_3_3_coordinate_values make] -} - */ -template -inline void assign_values(Geometry& geometry, - Type const& c1, Type const& c2, Type const& c3) -{ - concept::check(); - - dispatch::assign - < - typename tag::type, - Geometry, - geometry::dimension::type::value - >::apply(geometry, c1, c2, c3); -} - -/*! -\brief Assign four values to a geometry (usually a box or segment) -\ingroup assign -\tparam Geometry \tparam_geometry -\tparam Type \tparam_numeric to specify the coordinates -\param geometry \param_geometry -\param c1 First coordinate (usually x1) -\param c2 Second coordinate (usually y1) -\param c3 Third coordinate (usually x2) -\param c4 Fourth coordinate (usually y2) - -\qbk{distinguish, 4 coordinate values} - */ -template -inline void assign_values(Geometry& geometry, - Type const& c1, Type const& c2, Type const& c3, Type const& c4) -{ - concept::check(); - - dispatch::assign - < - typename tag::type, - Geometry, - geometry::dimension::type::value - >::apply(geometry, c1, c2, c3, c4); -} - - - }} // namespace boost::geometry