--- trunk/OOPSE/libmdtools/StuntDouble.cpp 2004/08/09 14:50:35 1451 +++ trunk/OOPSE/libmdtools/StuntDouble.cpp 2004/08/23 15:11:36 1452 @@ -151,6 +151,26 @@ void StuntDouble::setVel(double vel[3]){ default: sprintf( painCave.errMsg, "Unrecognized ObjType (%d) in StuntDouble::setVel.\n", + objType ); + painCave.isFatal = 1; + simError(); + } +} + +void StuntDouble::setFrc(double frc[3]){ + + switch (objType) + { + case OT_ATOM : + case OT_DATOM: + ((Atom*)this)->setFrc(frc); + break; + case OT_RIGIDBODY: + ((RigidBody*)this)->setFrc(frc); + break; + default: + sprintf( painCave.errMsg, + "Unrecognized ObjType (%d) in StuntDouble::setFrc.\n", objType ); painCave.isFatal = 1; simError(); @@ -367,6 +387,31 @@ void StuntDouble::getTrq(double trq[3]){ } } +void StuntDouble::setTrq(double trq[3]){ + switch (objType) + { + case OT_ATOM: + sprintf( painCave.errMsg, + "StuntDouble::setTrq was called for a regular atom.\n" + "\tRegular Atoms don't have torques. Be smarter.\n"); + painCave.isFatal = 1; + simError(); + break; + case OT_DATOM: + ((DirectionalAtom*)this)->setTrq(trq); + break; + case OT_RIGIDBODY: + ((RigidBody*)this)->setTrq(trq); + break; + default: + sprintf( painCave.errMsg, + "Unrecognized ObjType (%d) in StuntDouble::addTrq.\n", + objType ); + painCave.isFatal = 1; + simError(); + } +} + void StuntDouble::addTrq(double trq[3]){ switch (objType) {