diff options
author | over0219 <over0219@umn.edu> | 2020-06-16 23:51:38 +0300 |
---|---|---|
committer | over0219 <over0219@umn.edu> | 2020-06-16 23:51:38 +0300 |
commit | 38855afd50a6d1a7b7069f5732d08e03e0f585bf (patch) | |
tree | ce4729745817754186c0bfcb5a4e8a91ac0f926b /intern | |
parent | 0beb3002f27642b442f01e991ffcc4db76585cef (diff) |
lattice gen better but some bug on monkey, sometimes. probably a ptr error somewhere
Diffstat (limited to 'intern')
-rw-r--r-- | intern/softbody/admmpd_api.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/intern/softbody/admmpd_api.cpp b/intern/softbody/admmpd_api.cpp index 41bde09ee5f..1895b973fef 100644 --- a/intern/softbody/admmpd_api.cpp +++ b/intern/softbody/admmpd_api.cpp @@ -112,7 +112,6 @@ static int admmpd_init_with_lattice( ADMMPDInterfaceData *iface, float *in_verts, unsigned int *in_faces, Eigen::MatrixXd *V, Eigen::MatrixXi *T) { - (void)(in_faces); int nv = iface->mesh_totverts; Eigen::MatrixXd in_V(nv,3); for (int i=0; i<nv; ++i) @@ -123,8 +122,18 @@ static int admmpd_init_with_lattice( } } + int nf = iface->mesh_totfaces; + Eigen::MatrixXi in_F(nf,3); + for (int i=0; i<nf; ++i) + { + for (int j=0; j<3; ++j) + { + in_F(i,j) = in_faces[i*3+j]; + } + } + iface->totverts = 0; - bool success = iface->data->lattice->generate(in_V,V,T); + bool success = iface->data->lattice->generate(in_V,in_F,V,T); if (success) { iface->totverts = V->rows(); |