From ae7c3e0dee579c2ecde5bf31803f9c81e07ce522 Mon Sep 17 00:00:00 2001 From: Chuyuan Fu Date: Fri, 25 Oct 2019 12:14:38 -0700 Subject: [PATCH] compute COM taking non-uniform model into account --- src/BulletSoftBody/btSoftBody.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h index 0c0d6e849..5f0afc439 100644 --- a/src/BulletSoftBody/btSoftBody.h +++ b/src/BulletSoftBody/btSoftBody.h @@ -974,14 +974,16 @@ public: /* Return the volume */ btScalar getVolume() const; /* Cluster count */ - btVector3 getCenterOfMass() const{ - btVector3 com(0,0,0); - for(int i = 0; igetTotalMass(); + return com; + } int clusterCount() const; /* Cluster center of mass */ static btVector3 clusterCom(const Cluster* cluster);