| 75 | } |
| 76 | |
| 77 | static PX_FORCE_INLINE float validateDepth(float depth) |
| 78 | { |
| 79 | // PT: penetration depth must always be positive or null, but FPU accuracy being what it is, we sometimes |
| 80 | // end up with very small, epsilon-sized negative depths. We clamp those to zero, since they don't indicate |
| 81 | // real bugs in the MTD functions. However anything larger than epsilon is wrong, and caught with an assert. |
| 82 | const float epsilon = 1.e-3f; |
| 83 | |
| 84 | //ML: because we are shrunking the shape in this moment, so the depth might be larger than eps, this condition is no longer valid |
| 85 | //PX_ASSERT(depth>=-epsilon); |
| 86 | PX_UNUSED(epsilon); |
| 87 | return PxMax(depth, 0.0f); |
| 88 | } |
| 89 | |
| 90 | /////////////////////////////////////////////////////////////////////////////// |
| 91 |
no test coverage detected