Unverified Commit b3490b3b authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #242 from jcarpent/devel

Fix conversion
parents 1d7556a1 f0957b21
Pipeline #16036 passed with stage
in 21 minutes and 58 seconds
......@@ -33,6 +33,7 @@
#include <eigenpy/eigenpy.hpp>
#include <eigenpy/eigen-to-python.hpp>
#include "fcl.hh"
......@@ -77,8 +78,9 @@ typedef std::vector<Triangle> Triangles;
struct BVHModelBaseWrapper
typedef Eigen::Matrix<double,Eigen::Dynamic,3> MatrixX3;
typedef Eigen::Map<MatrixX3> MapMatrixX3;
typedef Eigen::Matrix<double,Eigen::Dynamic,3,Eigen::RowMajor> RowMatrixX3;
typedef Eigen::Map<RowMatrixX3> MapRowMatrixX3;
typedef Eigen::Ref<RowMatrixX3> RefRowMatrixX3;
static Vec3f & vertice (BVHModelBase & bvh, int i)
......@@ -86,9 +88,9 @@ struct BVHModelBaseWrapper
return bvh.vertices[i];
static MapMatrixX3 vertices(BVHModelBase & bvh)
static RefRowMatrixX3 vertices(BVHModelBase & bvh)
return MapMatrixX3(bvh.vertices[0].data(),bvh.num_vertices,3);
return MapRowMatrixX3(bvh.vertices[0].data(),bvh.num_vertices,3);
static Triangle tri_indices (const BVHModelBase& bvh, int i)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment