|
@@ -52,7 +52,6 @@ using namespace Eigen;
|
|
|
|
|
|
namespace igl {
|
|
namespace igl {
|
|
namespace comiso {
|
|
namespace comiso {
|
|
-
|
|
|
|
struct SeamInfo
|
|
struct SeamInfo
|
|
{
|
|
{
|
|
int v0,v0p,v1,v1p;
|
|
int v0,v0p,v1,v1p;
|
|
@@ -107,6 +106,9 @@ namespace comiso {
|
|
///this handle for mesh TODO: move with the other global variables
|
|
///this handle for mesh TODO: move with the other global variables
|
|
MeshSystemInfo Handle_SystemInfo;
|
|
MeshSystemInfo Handle_SystemInfo;
|
|
|
|
|
|
|
|
+ //DEBUG
|
|
|
|
+ std::vector<DebugFaceEdgeInfo> DebugInfo;
|
|
|
|
+
|
|
// internal
|
|
// internal
|
|
std::vector<std::vector<int> > VF, VFi;
|
|
std::vector<std::vector<int> > VF, VFi;
|
|
|
|
|
|
@@ -318,6 +320,9 @@ namespace comiso {
|
|
Eigen::PlainObjectBase<DerivedF> Fcut;
|
|
Eigen::PlainObjectBase<DerivedF> Fcut;
|
|
Eigen::MatrixXd UV_out;
|
|
Eigen::MatrixXd UV_out;
|
|
Eigen::PlainObjectBase<DerivedF> FUV_out;
|
|
Eigen::PlainObjectBase<DerivedF> FUV_out;
|
|
|
|
+
|
|
|
|
+ //DEBUG
|
|
|
|
+ std::vector<DebugFaceEdgeInfo> debugFaceEdgeInfo_out;
|
|
// internal
|
|
// internal
|
|
Eigen::PlainObjectBase<DerivedF> TT;
|
|
Eigen::PlainObjectBase<DerivedF> TT;
|
|
Eigen::PlainObjectBase<DerivedF> TTi;
|
|
Eigen::PlainObjectBase<DerivedF> TTi;
|
|
@@ -353,6 +358,10 @@ namespace comiso {
|
|
IGL_INLINE void extractUV(Eigen::PlainObjectBase<DerivedU> &UV_out,
|
|
IGL_INLINE void extractUV(Eigen::PlainObjectBase<DerivedU> &UV_out,
|
|
Eigen::PlainObjectBase<DerivedF> &FUV_out);
|
|
Eigen::PlainObjectBase<DerivedF> &FUV_out);
|
|
|
|
|
|
|
|
+ //DEBUG
|
|
|
|
+
|
|
|
|
+ IGL_INLINE void extractDebugInfo(std::vector<igl::comiso::DebugFaceEdgeInfo>& debugFaceEdgeInfo);
|
|
|
|
+
|
|
private:
|
|
private:
|
|
IGL_INLINE int NumFlips(const Eigen::MatrixXd& WUV);
|
|
IGL_INLINE int NumFlips(const Eigen::MatrixXd& WUV);
|
|
|
|
|
|
@@ -598,6 +607,9 @@ IGL_INLINE void igl::comiso::VertexIndexing<DerivedV, DerivedF>::InitSeamInfo()
|
|
Handle_SystemInfo.EdgeSeamInfo.push_back(SeamInfo(v0,v1,v0p,v1p,MM,integerVar));
|
|
Handle_SystemInfo.EdgeSeamInfo.push_back(SeamInfo(v0,v1,v0p,v1p,MM,integerVar));
|
|
connectingVertexCandidate0 = v0;
|
|
connectingVertexCandidate0 = v0;
|
|
connectingVertexCandidate1 = v1;
|
|
connectingVertexCandidate1 = v1;
|
|
|
|
+
|
|
|
|
+ //DEBUG
|
|
|
|
+ DebugInfo.push_back(DebugFaceEdgeInfo(f,k,integerVar));
|
|
}
|
|
}
|
|
integerVar++;
|
|
integerVar++;
|
|
}
|
|
}
|
|
@@ -1358,6 +1370,7 @@ F(F_)
|
|
|
|
|
|
UV_out = PSolver.UV_out;
|
|
UV_out = PSolver.UV_out;
|
|
FUV_out = PSolver.Fcut;
|
|
FUV_out = PSolver.Fcut;
|
|
|
|
+ debugFaceEdgeInfo_out = VInd.DebugInfo;
|
|
fflush(stdout);
|
|
fflush(stdout);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1369,6 +1382,12 @@ IGL_INLINE void igl::comiso::MIQ_class<DerivedV, DerivedF, DerivedU>::extractUV(
|
|
FUV_out = this->FUV_out;
|
|
FUV_out = this->FUV_out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//DEBUG
|
|
|
|
+template <typename DerivedV, typename DerivedF, typename DerivedU>
|
|
|
|
+IGL_INLINE void igl::comiso::MIQ_class<DerivedV, DerivedF, DerivedU>::extractDebugInfo(std::vector<igl::comiso::DebugFaceEdgeInfo>& debugFaceEdgeInfo){
|
|
|
|
+ debugFaceEdgeInfo = this->debugFaceEdgeInfo_out;
|
|
|
|
+}
|
|
|
|
+
|
|
template <typename DerivedV, typename DerivedF, typename DerivedU>
|
|
template <typename DerivedV, typename DerivedF, typename DerivedU>
|
|
IGL_INLINE int igl::comiso::MIQ_class<DerivedV, DerivedF, DerivedU>::NumFlips(const Eigen::MatrixXd& WUV)
|
|
IGL_INLINE int igl::comiso::MIQ_class<DerivedV, DerivedF, DerivedU>::NumFlips(const Eigen::MatrixXd& WUV)
|
|
{
|
|
{
|
|
@@ -1559,6 +1578,8 @@ IGL_INLINE void igl::comiso::miq(
|
|
const Eigen::Matrix<int, Eigen::Dynamic, 3> &Handle_Seams,
|
|
const Eigen::Matrix<int, Eigen::Dynamic, 3> &Handle_Seams,
|
|
Eigen::PlainObjectBase<DerivedU> &UV,
|
|
Eigen::PlainObjectBase<DerivedU> &UV,
|
|
Eigen::PlainObjectBase<DerivedF> &FUV,
|
|
Eigen::PlainObjectBase<DerivedF> &FUV,
|
|
|
|
+ //DEBUG
|
|
|
|
+ std::vector<igl::comiso::DebugFaceEdgeInfo> &debugFaceEdgeInfo,
|
|
double GradientSize,
|
|
double GradientSize,
|
|
double Stiffness,
|
|
double Stiffness,
|
|
bool DirectRound,
|
|
bool DirectRound,
|
|
@@ -1594,6 +1615,7 @@ IGL_INLINE void igl::comiso::miq(
|
|
hardFeatures);
|
|
hardFeatures);
|
|
|
|
|
|
miq.extractUV(UV,FUV);
|
|
miq.extractUV(UV,FUV);
|
|
|
|
+ miq.extractDebugInfo(debugFaceEdgeInfo);
|
|
}
|
|
}
|
|
|
|
|
|
template <typename DerivedV, typename DerivedF, typename DerivedU>
|
|
template <typename DerivedV, typename DerivedF, typename DerivedU>
|
|
@@ -1604,6 +1626,8 @@ IGL_INLINE void igl::comiso::miq(
|
|
const Eigen::PlainObjectBase<DerivedV> &PD2,
|
|
const Eigen::PlainObjectBase<DerivedV> &PD2,
|
|
Eigen::PlainObjectBase<DerivedU> &UV,
|
|
Eigen::PlainObjectBase<DerivedU> &UV,
|
|
Eigen::PlainObjectBase<DerivedF> &FUV,
|
|
Eigen::PlainObjectBase<DerivedF> &FUV,
|
|
|
|
+ //DEBUG
|
|
|
|
+ std::vector<igl::comiso::DebugFaceEdgeInfo> &debugFaceEdgeInfo,
|
|
double GradientSize,
|
|
double GradientSize,
|
|
double Stiffness,
|
|
double Stiffness,
|
|
bool DirectRound,
|
|
bool DirectRound,
|
|
@@ -1652,6 +1676,8 @@ IGL_INLINE void igl::comiso::miq(
|
|
Handle_Seams,
|
|
Handle_Seams,
|
|
UV,
|
|
UV,
|
|
FUV,
|
|
FUV,
|
|
|
|
+ //DEBUG
|
|
|
|
+ debugFaceEdgeInfo,
|
|
GradientSize,
|
|
GradientSize,
|
|
Stiffness,
|
|
Stiffness,
|
|
DirectRound,
|
|
DirectRound,
|