| 339 | |
| 340 | |
| 341 | void dBodySetRotation (dBodyID b, const dMatrix3 R) |
| 342 | { |
| 343 | dAASSERT (b && R); |
| 344 | dQuaternion q; |
| 345 | dRtoQ (R,q); |
| 346 | dNormalize4 (q); |
| 347 | b->q[0] = q[0]; |
| 348 | b->q[1] = q[1]; |
| 349 | b->q[2] = q[2]; |
| 350 | b->q[3] = q[3]; |
| 351 | dQtoR (b->q,b->R); |
| 352 | |
| 353 | // notify all attached geoms that this body has moved |
| 354 | for (dxGeom *geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) |
| 355 | dGeomMoved (geom); |
| 356 | } |
| 357 | |
| 358 | |
| 359 | void dBodySetQuaternion (dBodyID b, const dQuaternion q) |
no test coverage detected