//! Do update for the RB by useing the second test case TEFUNC void updateRigidBodyForThree(RigidBodyPtr body) { body->setAcceleration(lambda * body->getVelocity()); body->setAngularAcceleration(lambda * body->getAngularVelocity()); cout << "Accel: " << body->getAcceleration() << endl; }
//! Do update for the RB by useing the first test case TEFUNC void updateRigidBodyForOne(RigidBodyPtr body) { body->setVelocity(lambda * body->getPosition()); body->setAcceleration(lambda * body->getVelocity()); Vec3 axis; float angle; body->getOrientation().getAxisAngle(axis, angle); Quaternion tmp(lambda * angle, axis); body->setAngularVelocity(tmp.getEulerRotation()); body->setAngularAcceleration(lambda * body->getAngularVelocity()); }