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

Comparing trunk/OOPSE/libmdtools/StuntDouble.cpp (file contents):
Revision 1253 by gezelter, Tue Jun 8 16:49:46 2004 UTC vs.
Revision 1452 by tim, Mon Aug 23 15:11:36 2004 UTC

# Line 151 | Line 151 | void StuntDouble::setVel(double vel[3]){
151      default:
152        sprintf( painCave.errMsg,
153                 "Unrecognized ObjType (%d) in StuntDouble::setVel.\n",
154 +               objType );
155 +      painCave.isFatal = 1;
156 +      simError();    
157 +    }  
158 + }
159 +
160 + void StuntDouble::setFrc(double frc[3]){
161 +
162 +  switch (objType)
163 +    {
164 +    case OT_ATOM :
165 +    case OT_DATOM:      
166 +      ((Atom*)this)->setFrc(frc);
167 +      break;
168 +    case OT_RIGIDBODY:
169 +      ((RigidBody*)this)->setFrc(frc);
170 +      break;      
171 +    default:
172 +      sprintf( painCave.errMsg,
173 +               "Unrecognized ObjType (%d) in StuntDouble::setFrc.\n",
174                 objType );
175        painCave.isFatal = 1;
176        simError();    
# Line 367 | Line 387 | void StuntDouble::addTrq(double trq[3]){
387    }
388   }
389  
390 + void StuntDouble::setTrq(double trq[3]){
391 +  switch (objType)
392 +    {
393 +    case OT_ATOM:
394 +      sprintf( painCave.errMsg,
395 +               "StuntDouble::setTrq was called for a regular atom.\n"
396 +               "\tRegular Atoms don't have torques.  Be smarter.\n");
397 +      painCave.isFatal = 1;
398 +      simError();
399 +      break;
400 +    case OT_DATOM:
401 +      ((DirectionalAtom*)this)->setTrq(trq);
402 +    break;
403 +    case OT_RIGIDBODY:
404 +      ((RigidBody*)this)->setTrq(trq);
405 +    break;
406 +    default:
407 +      sprintf( painCave.errMsg,
408 +               "Unrecognized ObjType (%d) in StuntDouble::addTrq.\n",
409 +               objType );
410 +      painCave.isFatal = 1;
411 +      simError();    
412 +    }
413 + }
414 +
415   void StuntDouble::addTrq(double trq[3]){
416    switch (objType)
417      {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines