48 |
|
A[2][1] = -cos(phi) * sin(theta); |
49 |
|
A[2][2] = cos(theta); |
50 |
|
|
51 |
+ |
printf("A[2][x] = %lf\t%lf\t%lf\n", A[2][0], A[2][1], A[2][2]); |
52 |
+ |
|
53 |
|
} |
54 |
|
|
55 |
|
void RigidBody::getQ( double q[4] ){ |
323 |
|
//calculate the proper rotation matrix |
324 |
|
transposeMat3(pAxisMat, pAxisRotMat); |
325 |
|
|
326 |
+ |
|
327 |
|
for (i=0; i<myAtoms.size(); i++){ |
328 |
< |
getAtomPos(test, i); |
329 |
< |
printf("%d\t%d\t%d\n",test[0],test[1],test[2]); |
328 |
> |
apos = refCoords[i]; |
329 |
> |
printf("%f\t%f\t%f\n",apos[0],apos[1],apos[2]); |
330 |
|
} |
331 |
|
|
332 |
|
//rotate the rigid body to the principle axis frame |
336 |
|
} |
337 |
|
|
338 |
|
for (i=0; i<myAtoms.size(); i++){ |
339 |
< |
getAtomPos(test,i); |
340 |
< |
printf("%d\t%d\t%d\n",test[0],test[1],test[2]); |
339 |
> |
apos = refCoords[i]; |
340 |
> |
printf("%f\t%f\t%f\n",apos[0],apos[1],apos[2]); |
341 |
|
} |
342 |
|
|
343 |
|
identityMat3(iMat); |