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