MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / Create

Method Create

examples/SoftDemo/SoftDemo.cpp:621–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619 struct Functor
620 {
621 static btSoftBody* Create(SoftDemo* pdemo, const btVector3& x, const btVector3& a)
622 {
623 btSoftBody* psb = btSoftBodyHelpers::CreateFromTriMesh(pdemo->m_softBodyWorldInfo, gVertices,
624 &gIndices[0][0],
625 NUM_TRIANGLES);
626 psb->generateBendingConstraints(2);
627 psb->m_cfg.piterations = 2;
628 psb->m_cfg.collisions |= btSoftBody::fCollision::VF_SS;
629 psb->randomizeConstraints();
630 btMatrix3x3 m;
631 m.setEulerZYX(a.x(), a.y(), a.z());
632 psb->transform(btTransform(m, x));
633 psb->scale(btVector3(2, 2, 2));
634 psb->setTotalMass(50, true);
635 pdemo->getSoftDynamicsWorld()->addSoftBody(psb);
636 return (psb);
637 }
638 };
639 for (int i = 0; i < 3; ++i)
640 {

Callers

nothing calls this directly

Calls 15

randomizeConstraintsMethod · 0.80
appendMaterialMethod · 0.80
generateClustersMethod · 0.80
btTransformClass · 0.50
btVector3Class · 0.50
setEulerZYXMethod · 0.45
xMethod · 0.45
yMethod · 0.45
zMethod · 0.45
transformMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected