| 1179 | |
| 1180 | // |
| 1181 | static void Init_ClusterCollide1(SoftDemo* pdemo) |
| 1182 | { |
| 1183 | const btScalar s = 8; |
| 1184 | btSoftBody* psb = btSoftBodyHelpers::CreatePatch(pdemo->m_softBodyWorldInfo, btVector3(-s, 0, -s), |
| 1185 | btVector3(+s, 0, -s), |
| 1186 | btVector3(-s, 0, +s), |
| 1187 | btVector3(+s, 0, +s), |
| 1188 | 17, 17, //9,9,//31,31, |
| 1189 | 1 + 2 + 4 + 8, |
| 1190 | true); |
| 1191 | btSoftBody::Material* pm = psb->appendMaterial(); |
| 1192 | pm->m_kLST = 0.4; |
| 1193 | pm->m_flags -= btSoftBody::fMaterial::DebugDraw; |
| 1194 | psb->m_cfg.kDF = 1; |
| 1195 | psb->m_cfg.kSRHR_CL = 1; |
| 1196 | psb->m_cfg.kSR_SPLT_CL = 0; |
| 1197 | psb->m_cfg.collisions = btSoftBody::fCollision::CL_SS + |
| 1198 | |
| 1199 | btSoftBody::fCollision::CL_RS; |
| 1200 | psb->generateBendingConstraints(2, pm); |
| 1201 | |
| 1202 | psb->getCollisionShape()->setMargin(0.05); |
| 1203 | psb->setTotalMass(50); |
| 1204 | |
| 1205 | ///pass zero in generateClusters to create cluster for each tetrahedron or triangle |
| 1206 | psb->generateClusters(0); |
| 1207 | //psb->generateClusters(64); |
| 1208 | |
| 1209 | pdemo->getSoftDynamicsWorld()->addSoftBody(psb); |
| 1210 | |
| 1211 | Ctor_RbUpStack(pdemo, 10); |
| 1212 | } |
| 1213 | |
| 1214 | // |
| 1215 | static void Init_ClusterCollide2(SoftDemo* pdemo) |
nothing calls this directly
no test coverage detected