--- trunk/src/primitives/RigidBody.cpp 2005/10/03 15:54:23 642 +++ trunk/src/primitives/RigidBody.cpp 2005/12/02 15:38:03 770 @@ -173,16 +173,16 @@ namespace oopse { IAtom(0, 0) += mtmp * r2; IAtom(1, 1) += mtmp * r2; IAtom(2, 2) += mtmp * r2; + Itmp += IAtom; //project the inertial moment of directional atoms into this rigid body if (atoms_[i]->isDirectional()) { - IAtom += atoms_[i]->getI(); - Itmp += refOrients_[i].transpose() * IAtom * refOrients_[i]; - } else { - Itmp += IAtom; - } + Itmp += refOrients_[i].transpose() * atoms_[i]->getI() * refOrients_[i]; + } } + // std::cout << Itmp << std::endl; + //diagonalize Vector3d evals; Mat3x3d::diagonalize(Itmp, evals, sU_); @@ -483,7 +483,7 @@ namespace oopse { "RigidBody error.\n" "\tAtom %s does not have a position specified.\n" "\tThis means RigidBody cannot set up reference coordinates.\n", - ats->getType() ); + ats->getType().c_str() ); painCave.isFatal = 1; simError(); } @@ -503,7 +503,7 @@ namespace oopse { "RigidBody error.\n" "\tAtom %s does not have an orientation specified.\n" "\tThis means RigidBody cannot set up reference orientations.\n", - ats->getType() ); + ats->getType().c_str() ); painCave.isFatal = 1; simError(); }