| 19 | } |
| 20 | |
| 21 | void GetBoxExtensions(dGeomID box, const dReal* axis, const dReal* pos, const dReal* rot, float center_prg, dReal* lo_ext, dReal* hi_ext) |
| 22 | { |
| 23 | R_ASSERT2(dGeomGetClass(box) == dBoxClass, "is not a box"); |
| 24 | dVector3 length; |
| 25 | dGeomBoxGetLengths(box, length); |
| 26 | dReal dif = dDOT(pos, axis) - center_prg; |
| 27 | dReal ful_ext = dFabs(dDOT14(axis, rot + 0)) * length[0] + dFabs(dDOT14(axis, rot + 1)) * length[1] + dFabs(dDOT14(axis, rot + 2)) * length[2]; |
| 28 | ful_ext /= 2.f; |
| 29 | *lo_ext = -ful_ext + dif; |
| 30 | *hi_ext = ful_ext + dif; |
| 31 | } |
| 32 | |
| 33 | void GetCylinderExtensions(dGeomID cyl, const dReal* axis, const dReal* pos, const dReal* rot, float center_prg, dReal* lo_ext, dReal* hi_ext) |
| 34 | { |
no test coverage detected