Verified Commit 9c779cfb authored by Justin Carpentier's avatar Justin Carpentier
Browse files

bvh: fix matrix dimension

parent 877d28ca
......@@ -132,7 +132,7 @@ public:
int addVertex(const Vec3f& p);
/// @brief Add points in the new BVH model
int addVertices(const Matrix3f & points);
int addVertices(const Matrixx3f & points);
/// @brief Add one triangle in the new BVH model
int addTriangle(const Vec3f& p1, const Vec3f& p2, const Vec3f& p3);
......
......@@ -66,6 +66,7 @@ namespace fcl
typedef double FCL_REAL;
typedef Eigen::Matrix<FCL_REAL, 3, 1> Vec3f;
typedef Eigen::Matrix<FCL_REAL, 3, 3> Matrix3f;
typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 3> Matrixx3f;
typedef Eigen::Vector2i support_func_guess_t;
/// @brief Triangle with 3 indices for points
......
......@@ -219,7 +219,7 @@ int BVHModelBase::addVertex(const Vec3f& p)
return BVH_OK;
}
int BVHModelBase::addVertices(const Matrix3f & points)
int BVHModelBase::addVertices(const Matrixx3f & points)
{
if(build_state != BVH_BUILD_STATE_BEGUN)
{
......
......@@ -121,7 +121,7 @@ void testBVHModelPointCloud()
return;
}
Matrix3f all_points((Eigen::DenseIndex)points.size(),3);
Matrixx3f all_points((Eigen::DenseIndex)points.size(),3);
for(size_t k = 0; k < points.size(); ++k)
all_points.row((Eigen::DenseIndex)k) = points[k].transpose();
......
Supports Markdown
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