ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/RigidBody.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/RigidBody.cpp (file contents):
Revision 1451 by tim, Mon Jun 21 18:52:21 2004 UTC vs.
Revision 1452 by tim, Mon Aug 23 15:11:36 2004 UTC

# Line 86 | Line 86 | void RigidBody::addFrc(double theF[3]){
86      theF[i] = frc[i];
87   }      
88  
89 + void RigidBody::setFrc(double theF[3]){
90 +  for (int i = 0; i < 3 ; i++)
91 +    frc[i] = theF[i];
92 + }
93 +
94   void RigidBody::addFrc(double theF[3]){
95    for (int i = 0; i < 3 ; i++)
96      frc[i] += theF[i];
# Line 183 | Line 188 | void RigidBody::setQ( double the_q[4] ){
188    A[2][0] = 2.0 * ( the_q[1] * the_q[3] + the_q[0] * the_q[2] );
189    A[2][1] = 2.0 * ( the_q[2] * the_q[3] - the_q[0] * the_q[1] );
190    A[2][2] = q0Sqr - q1Sqr -q2Sqr +q3Sqr;  
186
191   }
192  
193   void RigidBody::getA( double the_A[3][3] ){
# Line 221 | Line 225 | void RigidBody::addTrq(double theT[3]){
225      theT[i] = trq[i];
226   }      
227  
228 + void RigidBody::setTrq(double theT[3]){
229 +  for (int i = 0; i < 3 ; i++)
230 +    trq[i] = theT[i];
231 + }      
232 +
233   void RigidBody::addTrq(double theT[3]){
234    for (int i = 0; i < 3 ; i++)
235      trq[i] += theT[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines