inline void translation(Point1 const& p1, Point2 const& p2, Vector & v) { concept::check_concepts_and_equal_dimensions<Point1 const, Point2 const>(); // TODO - replace the following by check_equal_dimensions concept::check_concepts_and_equal_dimensions<Point1 const, Vector>(); for_each_coordinate(v, detail::point_assignment<Point2>(p2)); for_each_coordinate(v, detail::point_operation<Point1, std::minus>(p1)); }
inline void assign_point(Point1& p1, Point2 const& p2) { BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) ); BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) ); for_each_coordinate(p1, detail::point_assignment<Point2>(p2)); }
inline void divide_point(Point1& p1, Point2 const& p2) { BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) ); BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) ); for_each_coordinate(p1, detail::point_operation<Point2, std::divides>(p2)); }
inline void assign_value(Point& p, typename detail::param<Point>::type value) { BOOST_CONCEPT_ASSERT( (concept::Point<Point>) ); for_each_coordinate(p, detail::value_assignment < typename coordinate_type<Point>::type >(value)); }
inline void divide_value(Point& p, typename detail::param<Point>::type value) { BOOST_CONCEPT_ASSERT( (concept::Point<Point>) ); for_each_coordinate(p, detail::value_operation < typename coordinate_type<Point>::type, std::divides >(value)); }