15 #include "bulletSoftBodyControl.h" 22 BulletSoftBodyControl::
23 BulletSoftBodyControl() {
37 BulletSoftBodyControl::
38 ~BulletSoftBodyControl() {
47 void BulletSoftBodyControl::
48 Prepare(btSoftBody::AJoint* joint) {
50 if (btFabs(_sign) > 0.0) {
51 joint->m_refs[0][0] = btCos(_angle * _sign);
52 joint->m_refs[0][2] = btSin(_angle * _sign);
61 btScalar BulletSoftBodyControl::
62 Speed(btSoftBody::AJoint *, btScalar current) {
64 return (current + btMin(_maxtorque, btMax(-_maxtorque, _goal - current)));