| 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]; |
| 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] ){ |
| 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]; |