Lines Matching refs:S

280 DistSqPoint3ToSegment3(const VEC3* P, const SEGMENT3* S, f32* t)  in DistSqPoint3ToSegment3()  argument
285 L.Set(S); in DistSqPoint3ToSegment3()
287 f32 P0P1 = FSqrt((S->P0 - S->P1).LenSq()); in DistSqPoint3ToSegment3()
296 VEC3Sub(&vec, P, &S->P0); in DistSqPoint3ToSegment3()
305 VEC3Sub(&vec, P, &S->P1); in DistSqPoint3ToSegment3()
335 DistSqSphereToPlane(const SPHERE* S, const PLANE* J) in DistSqSphereToPlane() argument
337 f32 distance = J->Test(S->C); in DistSqSphereToPlane()
338 if (distance > S->r) in DistSqSphereToPlane()
339 return (distance - S->r) * (distance - S->r); in DistSqSphereToPlane()
340 else if (distance < -S->r) in DistSqSphereToPlane()
341 return (distance + S->r) * (distance + S->r); in DistSqSphereToPlane()
375 SEGMENT3 S(vertices[0], vertices[1]); in DistSqPoint3ToPolyline3() local
376 dSq = DistSqPoint3ToSegment3(P, &S, NULL); in DistSqPoint3ToPolyline3()
673 DistSqLine3ToSegment3(const LINE3* L0, const SEGMENT3* S, f32* s, f32* t) in DistSqLine3ToSegment3() argument
676 VEC3Sub(&segDir, &S->P1, &S->P0); in DistSqLine3ToSegment3()
682 VEC3Sub(&u, &L0->P, &S->P0); in DistSqLine3ToSegment3()
733 VEC3Sub(&v, &v, &S->P0); in DistSqLine3ToSegment3()
815 DistSqRay3ToSegment3(const RAY3* R0, const SEGMENT3* S, f32* s, f32* t) in DistSqRay3ToSegment3() argument
822 VEC3Sub(&segDir, &S->P1, &S->P0); in DistSqRay3ToSegment3()
823 VEC3Sub(&u, &R0->P, &S->P0); in DistSqRay3ToSegment3()
900 VEC3Sub(&v, &v, &S->P0); in DistSqRay3ToSegment3()
980 IntersectionSegment3Plane(const SEGMENT3* S, const PLANE* J, f32* t, VEC3* I) in IntersectionSegment3Plane() argument
985 VEC3Sub(&dir, &S->P1, &S->P0); in IntersectionSegment3Plane()
987 LINE3 L(S->P0, dir); in IntersectionSegment3Plane()
1136 IntersectionSegment3Sphere(const SEGMENT3* S, const SPHERE* sphere, f32* t0, f32* t1) in IntersectionSegment3Sphere() argument
1139 VEC3Sub(&dir, &S->P1, &S->P0); in IntersectionSegment3Sphere()
1141 LINE3 L(S->P0, dir); in IntersectionSegment3Sphere()
1350 if (DistSqSegment3ToSegment3(&C0->S, &C1->S, NULL, NULL) in IntersectionCapsule()
1361 if (DistSqRay3ToSegment3(R, &C->S, NULL, NULL) <= C->r * C->r) in IntersectionRay3Capsule()
1370 if (DistSqLine3ToSegment3(L, &C->S, NULL, NULL) <= C->r * C->r) in IntersectionLine3Capsule()
1379 f32 s0 = J->Test(C->S.P0); in IntersectionPlaneCapsule()
1380 f32 s1 = J->Test(C->S.P1); in IntersectionPlaneCapsule()
1391 FRUSTUM::IntersectSphere(const SPHERE* S) const in IntersectSphere()
1399 viewPos.z = cam.f._20 * S->C.x + in IntersectSphere()
1400 cam.f._21 * S->C.y + in IntersectSphere()
1401 cam.f._22 * S->C.z + in IntersectSphere()
1405 if (viewPos.z - S->r > znear) in IntersectSphere()
1409 if (viewPos.z + S->r < zfar) in IntersectSphere()
1413 viewPos.x = cam.f._00 * S->C.x + in IntersectSphere()
1414 cam.f._01 * S->C.y + in IntersectSphere()
1415 cam.f._02 * S->C.z + in IntersectSphere()
1422 if (Dist > S->r) in IntersectSphere()
1429 if (Dist > S->r) in IntersectSphere()
1433 viewPos.y = cam.f._10 * S->C.x + in IntersectSphere()
1434 cam.f._11 * S->C.y + in IntersectSphere()
1435 cam.f._12 * S->C.z + in IntersectSphere()
1442 if (Dist > S->r) in IntersectSphere()
1449 if (Dist > S->r) in IntersectSphere()