135 |
|
v->visit(this); |
136 |
|
} |
137 |
|
|
138 |
+ |
/**@todo need modification */ |
139 |
|
void RigidBody::calcRefCoords() { |
140 |
|
/* |
141 |
|
double mtmp; |
421 |
|
} |
422 |
|
|
423 |
|
} |
424 |
+ |
|
425 |
+ |
|
426 |
+ |
void RigidBody::addAtom(Atom* at, AtomStamp* ats) { |
427 |
+ |
|
428 |
+ |
Vector3d coords; |
429 |
+ |
Vector3d euler; |
430 |
+ |
Mat3x3d Atmp; |
431 |
|
|
432 |
+ |
atoms_.push_back(at); |
433 |
+ |
|
434 |
+ |
if( !ats->havePosition() ){ |
435 |
+ |
sprintf( painCave.errMsg, |
436 |
+ |
"RigidBody error.\n" |
437 |
+ |
"\tAtom %s does not have a position specified.\n" |
438 |
+ |
"\tThis means RigidBody cannot set up reference coordinates.\n", |
439 |
+ |
ats->getType() ); |
440 |
+ |
painCave.isFatal = 1; |
441 |
+ |
simError(); |
442 |
+ |
} |
443 |
+ |
|
444 |
+ |
coords[0] = ats->getPosX(); |
445 |
+ |
coords[1] = ats->getPosY(); |
446 |
+ |
coords[2] = ats->getPosZ(); |
447 |
+ |
|
448 |
+ |
refCoords_.push_back(coords); |
449 |
+ |
|
450 |
+ |
/* |
451 |
+ |
if (at->isDirectional()) { |
452 |
+ |
|
453 |
+ |
if( !ats->haveOrientation() ){ |
454 |
+ |
sprintf( painCave.errMsg, |
455 |
+ |
"RigidBody error.\n" |
456 |
+ |
"\tAtom %s does not have an orientation specified.\n" |
457 |
+ |
"\tThis means RigidBody cannot set up reference orientations.\n", |
458 |
+ |
ats->getType() ); |
459 |
+ |
painCave.isFatal = 1; |
460 |
+ |
simError(); |
461 |
+ |
} |
462 |
+ |
|
463 |
+ |
euler[0] = ats->getEulerPhi(); |
464 |
+ |
euler[1] = ats->getEulerTheta(); |
465 |
+ |
euler[2] = ats->getEulerPsi(); |
466 |
+ |
|
467 |
+ |
doEulerToRotMat(euler, Atmp); |
468 |
+ |
refOrients.push_back(Atmp); |
469 |
+ |
|
470 |
+ |
} |
471 |
+ |
*/ |
472 |
+ |
|
473 |
|
} |
474 |
|
|
475 |
+ |
} |
476 |
+ |
|