I'm using std::array to define 2D points for a shortest path function.
typedef std::array<double, 2> point_xy_t;
typedef std::vector<point_xy_t> path_t;
path_t search(const point_xy_t& start, const point_xy_t& goal);
For now, my best solution is to convert points ( std::array ) to std::vector, and use boost::python::vector_indexing_suite as:
bpy::class_<std::vector<double> >("Point")
.def(bpy::vector_indexing_suite<std::vector<double> >())
;
bpy::class_<std::vector<std::vector<double>> >("Path")
.def(bpy::vector_indexing_suite<std::vector<std::vector<double>> >())
;
Would it be possible to index or convert directly from/to std::array to/from python ?