|
@@ -42,6 +42,7 @@ IGL_INLINE void igl::outer_hull(
|
|
|
typedef Matrix<typename DerivedF::Scalar,Dynamic,DerivedF::ColsAtCompileTime> MatrixXF;
|
|
|
typedef Matrix<typename DerivedG::Scalar,Dynamic,DerivedG::ColsAtCompileTime> MatrixXG;
|
|
|
typedef Matrix<typename DerivedJ::Scalar,Dynamic,DerivedJ::ColsAtCompileTime> MatrixXJ;
|
|
|
+ typedef Matrix<typename DerivedN::Scalar,1,3> RowVector3N;
|
|
|
const Index m = F.rows();
|
|
|
|
|
|
#ifdef IGL_OUTER_HULL_DEBUG
|
|
@@ -71,7 +72,7 @@ IGL_INLINE void igl::outer_hull(
|
|
|
{
|
|
|
// Base normal vector to orient against
|
|
|
const auto fe0 = uE2E[ui][0];
|
|
|
- const auto & eVp = N.row(fe0%m);
|
|
|
+ const RowVector3N & eVp = N.row(fe0%m);
|
|
|
di[ui].resize(uE2E[ui].size());
|
|
|
|
|
|
const typename DerivedF::Scalar d = F(fe0%m,((fe0/m)+2)%3);
|
|
@@ -92,7 +93,7 @@ IGL_INLINE void igl::outer_hull(
|
|
|
assert(!cons[fei] || (s == F(f,(c+2)%3)));
|
|
|
assert(!cons[fei] || (d == F(f,(c+1)%3)));
|
|
|
// Angle between n and f
|
|
|
- const auto & n = N.row(f);
|
|
|
+ const RowVector3N & n = N.row(f);
|
|
|
di[ui][fei] = M_PI - atan2( eVp.cross(n).dot(eV), eVp.dot(n));
|
|
|
if(!cons[fei])
|
|
|
{
|
|
@@ -454,4 +455,5 @@ IGL_INLINE void igl::outer_hull(
|
|
|
// Explicit template specialization
|
|
|
template void igl::outer_hull<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
|
|
|
template void igl::outer_hull<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
|
+template void igl::outer_hull<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
|
|
|
#endif
|