Hello,
I just started yesterday looking into boost.geometry to use on our own legacy system of Vertices (Points) in Meshes.
I'm quite impressed how easy it is to adapt to existing code and got it working (with some workarounds) really quick.
However, some problems remain.
We have a Vertex object, with a dimension determined at runtime. The actual position is saved as VECTOR_T (usually an
Eigen::VectorXd (double vector of arbitrary dimension)). One can get the coordinates using "const Eigen::VectorXd&
Vertex::getNormal()"
I was able to adapt to geometry by adding getters/setts for the dimensions: double getX() and getY() and
BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(mesh::Vertex, double, cs::cartesian, getX, getY, setX, setY)
and it works!
But in theory the vertices can be of arbitrary dimension, in practice it's usually 1, 2 or 3.
What is the best way to adapt our Vertex object to geometry?
- Change our Vertex so that it meets the model::point requirements. It worked so far, for the access I use:
template