Lines Matching refs:v

433     f32 v;  in DistSqPoint3ToAABB()  local
436 vv = v = P->x; in DistSqPoint3ToAABB()
437 if (v < B->Pmin.x) in DistSqPoint3ToAABB()
439 sqDist += (B->Pmin.x - v) * (B->Pmin.x - v); in DistSqPoint3ToAABB()
442 else if (v > B->Pmax.x) in DistSqPoint3ToAABB()
444 sqDist += (B->Pmax.x - v) * (B->Pmax.x - v); in DistSqPoint3ToAABB()
450 vv = v = P->y; in DistSqPoint3ToAABB()
451 if (v < B->Pmin.y) in DistSqPoint3ToAABB()
453 sqDist += (B->Pmin.y - v) * (B->Pmin.y - v); in DistSqPoint3ToAABB()
456 else if (v > B->Pmax.y) in DistSqPoint3ToAABB()
458 sqDist += (B->Pmax.y - v) * (B->Pmax.y - v); in DistSqPoint3ToAABB()
464 vv = v = P->z; in DistSqPoint3ToAABB()
465 if (v < B->Pmin.z) in DistSqPoint3ToAABB()
467 sqDist += (B->Pmin.z - v) * (B->Pmin.z - v); in DistSqPoint3ToAABB()
470 else if (v > B->Pmax.z) in DistSqPoint3ToAABB()
472 sqDist += (B->Pmax.z - v) * (B->Pmax.z - v); in DistSqPoint3ToAABB()
540 VEC3 v(S2->P1 - S2->P0); in DistSqSegment3ToSegment3() local
543 f32 b = VEC3Dot(&u, &v); in DistSqSegment3ToSegment3()
544 f32 c = VEC3SquareLen(&v); // always >= 0 in DistSqSegment3ToSegment3()
546 f32 e = VEC3Dot(&v, &w); in DistSqSegment3ToSegment3()
609 VEC3 dP = w + (u * sc) - (v * tc); // = S1(sc) - S2(tc) in DistSqSegment3ToSegment3()
663 VEC3 v; in DistSqLine3ToRay3() local
665 VEC3Add(&v, &L->P, VEC3Scale(&tmp, &L->d, s_)); in DistSqLine3ToRay3()
666 VEC3Sub(&v, &v, &R->P); in DistSqLine3ToRay3()
667 VEC3Sub(&v, &v, VEC3Scale(&tmp, &R->d, t_)); in DistSqLine3ToRay3()
669 return VEC3SquareLen(&v); in DistSqLine3ToRay3()
730 VEC3 v; in DistSqLine3ToSegment3() local
732 VEC3Add(&v, &L0->P, VEC3Scale(&tmp, &L0->d, s_)); in DistSqLine3ToSegment3()
733 VEC3Sub(&v, &v, &S->P0); in DistSqLine3ToSegment3()
734 VEC3Sub(&v, &v, VEC3Scale(&tmp, &segDir, t_)); in DistSqLine3ToSegment3()
736 return VEC3SquareLen(&v); in DistSqLine3ToSegment3()
805 VEC3 v; in DistSqRay3ToRay3() local
807 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToRay3()
808 VEC3Sub(&v, &v, &R1->P); in DistSqRay3ToRay3()
809 VEC3Sub(&v, &v, VEC3Scale(&tmp, &R1->d, t_)); in DistSqRay3ToRay3()
811 return VEC3SquareLen(&v); in DistSqRay3ToRay3()
897 VEC3 v; in DistSqRay3ToSegment3() local
899 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToSegment3()
900 VEC3Sub(&v, &v, &S->P0); in DistSqRay3ToSegment3()
901 VEC3Sub(&v, &v, VEC3Scale(&tmp, &segDir, t_)); in DistSqRay3ToSegment3()
903 return VEC3SquareLen(&v); in DistSqRay3ToSegment3()