[ODE] dBodyGetTorque & dBodyGetForce confusion

Nguyen Binh ngbinh at glassegg.com
Tue Jul 27 09:24:42 MST 2004


Hi Mark,

   Look at the code:

const dReal * dBodyGetForce (dBodyID b)
{
  dAASSERT (b);
  return b->facc;
}


const dReal * dBodyGetTorque (dBodyID b)
{
  dAASSERT (b);
  return b->tacc;
}

  You will see those functions just return body's temporary variable.
  Those variables will be reset to 0 after each physical step. So the
  main purpose of those function is shorthand in the internal code
  (between the physical step). So to actually get the force and torque
  applied to each body, use force feedback feature.
  
MR> Hello there,

MR> I've dug around through the mailing list archives but I couldn't find
MR> any definite answers.. So I figured I may as well post a message.

MR> I'm trying to use dBodyGetTorque and dBodyGetForce and it seems they
MR> _always_ return zero vectors, even when they're colliding and being
MR> spun around. Is there a specific spot in the simulation step that they
MR> must be used? Or am I just missing something?

MR> Thanks,

MR> Mark
MR> (ps. sorry if this is a double post, gmail is acting funky)



-- 
Best regards,

---------------------------------------------------------------------
   Nguyen Binh
   Software Engineer
   Glass Egg Digital Media
   
   E.Town Building  
   7th Floor, 364 CongHoa Street
   Tan Binh District,
   HoChiMinh City,
   VietNam,

   Phone : +84 8 8109018
   Fax   : +84 8 8109013

     www.glassegg.com
---------------------------------------------------------------------



More information about the ODE mailing list