--- trunk/src/primitives/RigidBody.cpp 2005/04/15 22:04:00 507 +++ trunk/src/primitives/RigidBody.cpp 2005/10/03 14:31:31 641 @@ -178,10 +178,7 @@ namespace oopse { //project the inertial moment of directional atoms into this rigid body for (std::size_t i = 0; i < atoms_.size(); i++) { if (atoms_[i]->isDirectional()) { - RectMatrix Iproject = refOrients_[i].transpose() * atoms_[i]->getI(); - Itmp(0, 0) += Iproject(0, 0); - Itmp(1, 1) += Iproject(1, 1); - Itmp(2, 2) += Iproject(2, 2); + Itmp += refOrients_[i].transpose() * atoms_[i]->getI() * refOrients_[i]; } } @@ -273,8 +270,7 @@ namespace oopse { if (atoms_[i]->isDirectional()) { dAtom = (DirectionalAtom *) atoms_[i]; - dAtom->setA(a * refOrients_[i]); - //dAtom->rotateBy( A ); + dAtom->setA(refOrients_[i] * a); } } @@ -301,7 +297,7 @@ namespace oopse { if (atoms_[i]->isDirectional()) { dAtom = (DirectionalAtom *) atoms_[i]; - dAtom->setA(a * refOrients_[i], frame); + dAtom->setA(refOrients_[i] * a, frame); } }