Trying to fix compilation of IGL AABB tree on 32 bit platform.

Removing alignment constraints from Eigen Matrix aliases.
This commit is contained in:
tamasmeszaros 2018-11-08 16:40:47 +01:00
parent 100386c699
commit 4a2da3d443
4 changed files with 11 additions and 7 deletions

View file

@ -64,7 +64,7 @@ struct Contour3D {
} }
}; };
using PointSet = Eigen::MatrixXd; //using PointSet = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::DontAlign>; //Eigen::MatrixXd;
using ClusterEl = std::vector<unsigned>; using ClusterEl = std::vector<unsigned>;
using ClusteredPoints = std::vector<ClusterEl>; using ClusteredPoints = std::vector<ClusterEl>;

View file

@ -1618,7 +1618,7 @@ SlicedSupports SLASupportTree::slice(float layerh, float init_layerh) const
heights.emplace_back(h); heights.emplace_back(h);
} }
std::vector<SlicedSupports> mergev(heights.size(), {}); std::vector<SlicedSupports> mergev(heights.size());
slice_part(stree.heads(), mergev, heights); slice_part(stree.heads(), mergev, heights);
slice_part(stree.pillars(), mergev, heights); slice_part(stree.pillars(), mergev, heights);

View file

@ -74,11 +74,13 @@ struct Controller {
/// An index-triangle structure for libIGL functions. Also serves as an /// An index-triangle structure for libIGL functions. Also serves as an
/// alternative (raw) input format for the SLASupportTree /// alternative (raw) input format for the SLASupportTree
struct EigenMesh3D { struct EigenMesh3D {
Eigen::MatrixXd V; // Eigen::MatrixXd V;
Eigen::MatrixXi F; // Eigen::MatrixXi F;
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::DontAlign> V;
Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::DontAlign> F;
}; };
using PointSet = Eigen::MatrixXd; using PointSet = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::DontAlign>; //Eigen::MatrixXd;
/* ************************************************************************** */ /* ************************************************************************** */
/* TODO: May not be needed: */ /* TODO: May not be needed: */

View file

@ -76,8 +76,10 @@ size_t SpatIndex::size() const
} }
PointSet normals(const PointSet& points, const EigenMesh3D& mesh) { PointSet normals(const PointSet& points, const EigenMesh3D& mesh) {
Eigen::VectorXd dists; // Eigen::VectorXd dists;
Eigen::VectorXi I; // Eigen::VectorXi I;
Eigen::Matrix<double, Eigen::Dynamic, 1, Eigen::DontAlign> dists;
Eigen::Matrix<int, Eigen::Dynamic, 1, Eigen::DontAlign> I;
PointSet C; PointSet C;
igl::point_mesh_squared_distance( points, mesh.V, mesh.F, dists, I, C); igl::point_mesh_squared_distance( points, mesh.V, mesh.F, dists, I, C);