Cloth attach
| 529 | // Cloth attach |
| 530 | // |
| 531 | static void Init_ClothAttach(SoftDemo* pdemo) |
| 532 | { |
| 533 | //TRACEDEMO |
| 534 | const btScalar s = 4; |
| 535 | const btScalar h = 6; |
| 536 | const int r = 9; |
| 537 | btSoftBody* psb = btSoftBodyHelpers::CreatePatch(pdemo->m_softBodyWorldInfo, btVector3(-s, h, -s), |
| 538 | btVector3(+s, h, -s), |
| 539 | btVector3(-s, h, +s), |
| 540 | btVector3(+s, h, +s), r, r, 4 + 8, true); |
| 541 | pdemo->getSoftDynamicsWorld()->addSoftBody(psb); |
| 542 | |
| 543 | btTransform startTransform; |
| 544 | startTransform.setIdentity(); |
| 545 | startTransform.setOrigin(btVector3(0, h, -(s + 3.5))); |
| 546 | btRigidBody* body = pdemo->createRigidBody(20, startTransform, new btBoxShape(btVector3(s, 1, 3))); |
| 547 | psb->appendAnchor(0, body); |
| 548 | psb->appendAnchor(r - 1, body); |
| 549 | pdemo->m_cutting = true; |
| 550 | } |
| 551 | |
| 552 | // |
| 553 | // Impact |
nothing calls this directly
no test coverage detected