|
@@ -780,7 +780,7 @@ template <
|
|
typename DerivedPD2,
|
|
typename DerivedPD2,
|
|
typename DerivedPV1,
|
|
typename DerivedPV1,
|
|
typename DerivedPV2>
|
|
typename DerivedPV2>
|
|
-IGL_INLINE void igl::principal_curvature(
|
|
|
|
|
|
+IGL_INLINE bool igl::principal_curvature(
|
|
const Eigen::PlainObjectBase<DerivedV>& V,
|
|
const Eigen::PlainObjectBase<DerivedV>& V,
|
|
const Eigen::PlainObjectBase<DerivedF>& F,
|
|
const Eigen::PlainObjectBase<DerivedF>& F,
|
|
Eigen::PlainObjectBase<DerivedPD1>& PD1,
|
|
Eigen::PlainObjectBase<DerivedPD1>& PD1,
|
|
@@ -817,6 +817,8 @@ IGL_INLINE void igl::principal_curvature(
|
|
|
|
|
|
// Compute
|
|
// Compute
|
|
cc.computeCurvature();
|
|
cc.computeCurvature();
|
|
|
|
+ if (!cc.curvatureComputed)
|
|
|
|
+ return false;
|
|
|
|
|
|
// Copy it back
|
|
// Copy it back
|
|
for (unsigned i=0; i<V.rows(); ++i)
|
|
for (unsigned i=0; i<V.rows(); ++i)
|
|
@@ -843,6 +845,8 @@ IGL_INLINE void igl::principal_curvature(
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ return true;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
#ifdef IGL_STATIC_LIBRARY
|