Vote count:
0
I would like to use operators in boost.Geometry instead of multiply_value, add_point, dot_product ... . Do I have to define these myself?
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
namespace bg = boost::geometry;
using Point = bg::model::point<double, 3, bg::cs::cartesian>;
using namespace bg;
void test()
{
const double z{2.0};
const Point a{1.0,2.0,-1.0};
// this doesn't compile:
// const Point b{z*a};
// const Point c{a+b};
// instead I have to do this:
Point b{a};
multiply_value(b, z);
Point c{5.0,1.0,0.0};
add_point(c, b);
}
asked 1 min ago
boost.Geometry operators
Aucun commentaire:
Enregistrer un commentaire