| 80 | } |
| 81 | |
| 82 | bool ObjColSphere::IsHitSphere(JGeometry::TVec3f posOther, JGeometry::TVec3f posThis, f32 otherRadius) |
| 83 | { |
| 84 | bool isHit = false; |
| 85 | mPos.sub(posThis, posOther); |
| 86 | f32 minSeparationSq, distanceSq; |
| 87 | if (checkRadialCollisionXYZ(otherRadius, mPos, minSeparationSq, distanceSq)) { |
| 88 | f32 minSeparation = JMAFastSqrt(minSeparationSq); |
| 89 | f32 distance = JMAFastSqrt(distanceSq); |
| 90 | mBoundDepth = minSeparation - distance; |
| 91 | stVecNormalize(mPos); |
| 92 | isHit = true; |
| 93 | } |
| 94 | return isHit; |
| 95 | } |
| 96 | |
| 97 | bool ObjColSphere::IsHitCylinder(JGeometry::TVec3f posThis, JGeometry::TVec3f posOther, |
| 98 | const ObjColCylinder &cylinderCol) |
no test coverage detected