|
@@ -1,7 +1,7 @@
|
|
|
#include <igl/avg_edge_length.h>
|
|
|
#include <igl/barycenter.h>
|
|
|
#include <igl/jet.h>
|
|
|
-#include <igl/shapeup.h>
|
|
|
+#include <igl/shapeup.h>
|
|
|
#include <igl/shapeup_local_projections.h>
|
|
|
#include <igl/quad_planarity.h>
|
|
|
#include <igl/readDMAT.h>
|
|
@@ -15,16 +15,16 @@
|
|
|
|
|
|
|
|
|
Eigen::MatrixXd VQC;
|
|
|
-Eigen::MatrixXi FQC;
|
|
|
+Eigen::MatrixXi FQC;
|
|
|
Eigen::MatrixXi E;
|
|
|
Eigen::MatrixXi FQCtri;
|
|
|
-Eigen::MatrixXd PQC0, PQC1, PQC2, PQC3;
|
|
|
-
|
|
|
-Eigen::MatrixXd VQCregular;
|
|
|
-Eigen::MatrixXi FQCtriregular;
|
|
|
-Eigen::MatrixXd PQC0regular, PQC1regular, PQC2regular, PQC3regular;
|
|
|
-
|
|
|
-igl::ShapeupData su_data;
|
|
|
+Eigen::MatrixXd PQC0, PQC1, PQC2, PQC3;
|
|
|
+
|
|
|
+Eigen::MatrixXd VQCregular;
|
|
|
+Eigen::MatrixXi FQCtriregular;
|
|
|
+Eigen::MatrixXd PQC0regular, PQC1regular, PQC2regular, PQC3regular;
|
|
|
+
|
|
|
+igl::ShapeupData su_data;
|
|
|
|
|
|
|
|
|
|
|
@@ -39,7 +39,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
|
|
|
|
|
|
|
|
|
if (key == '1')
|
|
|
- {
|
|
|
+ {
|
|
|
cout<<"before setting mesh 1"<<endl;
|
|
|
|
|
|
viewer.data.set_mesh(VQC, FQCtri);
|
|
@@ -63,7 +63,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
|
|
|
|
|
|
if (key == '2')
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
cout<<"before setting mesh 2"<<endl;
|
|
|
viewer.data.set_mesh(VQCregular, FQCtri);
|
|
|
|
|
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
- igl::readOFF(TUTORIAL_SHARED_PATH "/halftunnel.off", VQC, FQC);
|
|
|
+ igl::readOFF(TUTORIAL_SHARED_PATH "/halftunnel.off", VQC, FQC);
|
|
|
|
|
|
|
|
|
FQCtri.resize(2*FQC.rows(), 3);
|
|
@@ -104,24 +104,24 @@ int main(int argc, char *argv[])
|
|
|
igl::slice( VQC, FQC.col(3).eval(), 1, PQC3);
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- E.resize(FQC.size(),2);
|
|
|
- E.col(0)<<FQC.col(0),FQC.col(1),FQC.col(2),FQC.col(3);
|
|
|
- E.col(1)<<FQC.col(1),FQC.col(2),FQC.col(3),FQC.col(0);
|
|
|
-
|
|
|
- VectorXi b;
|
|
|
- VectorXd w(FQC.rows());
|
|
|
- MatrixXd bc;
|
|
|
-
|
|
|
- VectorXi array_of_fours=VectorXi::Constant(FQC.rows(),4);
|
|
|
- cout<<"before pre-computation"<<endl;
|
|
|
- std::function<bool(const Eigen::PlainObjectBase<MatrixXd>&, const Eigen::PlainObjectBase<VectorXi>&, const Eigen::PlainObjectBase<MatrixXi>&, Eigen::PlainObjectBase<MatrixXd>&)> localFunction(igl::shapeup_identity_projection);
|
|
|
-
|
|
|
- shapeup_precomputation(VQC, array_of_fours,FQC,E,b,w, localFunction,su_data);
|
|
|
- cout<<"after pre-computation"<<endl;
|
|
|
- shapeup_solve(bc,VQC,su_data,VQCregular);
|
|
|
- cout<<"after computation"<<endl;
|
|
|
+
|
|
|
+
|
|
|
+ E.resize(FQC.size(),2);
|
|
|
+ E.col(0)<<FQC.col(0),FQC.col(1),FQC.col(2),FQC.col(3);
|
|
|
+ E.col(1)<<FQC.col(1),FQC.col(2),FQC.col(3),FQC.col(0);
|
|
|
+
|
|
|
+ VectorXi b;
|
|
|
+ VectorXd w(FQC.rows());
|
|
|
+ MatrixXd bc(0,3);
|
|
|
+
|
|
|
+ VectorXi array_of_fours=VectorXi::Constant(FQC.rows(),4);
|
|
|
+ cout<<"before pre-computation"<<endl;
|
|
|
+ std::function<bool(const Eigen::PlainObjectBase<MatrixXd>&, const Eigen::PlainObjectBase<VectorXi>&, const Eigen::PlainObjectBase<MatrixXi>&, Eigen::PlainObjectBase<MatrixXd>&)> localFunction(igl::shapeup_identity_projection);
|
|
|
+
|
|
|
+ shapeup_precomputation(VQC, array_of_fours,FQC,E,b,w, localFunction,su_data);
|
|
|
+ cout<<"after pre-computation"<<endl;
|
|
|
+ shapeup_solve(bc,VQC,su_data,VQCregular);
|
|
|
+ cout<<"after computation"<<endl;
|
|
|
|
|
|
|
|
|
|