--- trunk/OOPSE/libmdtools/RigidBody.cpp 2004/08/09 14:50:35 1451 +++ trunk/OOPSE/libmdtools/RigidBody.cpp 2004/08/23 15:11:36 1452 @@ -86,6 +86,11 @@ void RigidBody::addFrc(double theF[3]){ theF[i] = frc[i]; } +void RigidBody::setFrc(double theF[3]){ + for (int i = 0; i < 3 ; i++) + frc[i] = theF[i]; +} + void RigidBody::addFrc(double theF[3]){ for (int i = 0; i < 3 ; i++) frc[i] += theF[i]; @@ -183,7 +188,6 @@ void RigidBody::setQ( double the_q[4] ){ A[2][0] = 2.0 * ( the_q[1] * the_q[3] + the_q[0] * the_q[2] ); A[2][1] = 2.0 * ( the_q[2] * the_q[3] - the_q[0] * the_q[1] ); A[2][2] = q0Sqr - q1Sqr -q2Sqr +q3Sqr; - } void RigidBody::getA( double the_A[3][3] ){ @@ -221,6 +225,11 @@ void RigidBody::addTrq(double theT[3]){ theT[i] = trq[i]; } +void RigidBody::setTrq(double theT[3]){ + for (int i = 0; i < 3 ; i++) + trq[i] = theT[i]; +} + void RigidBody::addTrq(double theT[3]){ for (int i = 0; i < 3 ; i++) trq[i] += theT[i];