move deformation update to before explicit force calculation to prevent repetition of F calculation

This commit is contained in:
Xuchen Han
2019-08-19 11:30:25 -07:00
parent 74adce7322
commit 54bd93aad2
4 changed files with 23 additions and 15 deletions

View File

@@ -293,7 +293,7 @@ public:
btScalar m_c1; // (4*kVST)/(im0+im1+im2+im3)
btScalar m_c2; // m_c1/sum(|g0..3|^2)
btMatrix3x3 m_Dm_inverse; // rest Dm^-1
btMatrix3x3 m_ds;
btMatrix3x3 m_F;
btScalar m_element_measure;
};
/* RContact */
@@ -1027,6 +1027,7 @@ public:
void dampClusters();
void setSpringStiffness(btScalar k);
void initializeDmInverse();
void updateDeformation();
void applyForces();
static void PSolve_Anchors(btSoftBody* psb, btScalar kst, btScalar ti);
static void PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti);