Lines Matching refs:d
41 d = -VEC3Dot(&N, P0); in Set()
241 f32 t_ = VEC3Dot(&L->d, VEC3Sub(&LP, P, &L->P)); in DistSqPoint3ToLine3()
244 VEC3Add(&PP, &L->P, VEC3Scale(&PP, &L->d, t_)); in DistSqPoint3ToLine3()
491 f32 b, d, e, f, det; in DistSqLine3ToLine3() local
495 b = VEC3Dot(&L0->d, &L1->d); in DistSqLine3ToLine3()
497 d = VEC3Dot(&L0->d, &u); in DistSqLine3ToLine3()
498 e = VEC3Dot(&L1->d, &u); in DistSqLine3ToLine3()
518 s_ = (b * e - d) * invDet; in DistSqLine3ToLine3()
519 t_ = (e - b * d) * invDet; in DistSqLine3ToLine3()
528 VEC3Scale(&tmp0, &L0->d, s_), in DistSqLine3ToLine3()
529 VEC3Scale(&tmp1, &L1->d, t_)); in DistSqLine3ToLine3()
545 f32 d = VEC3Dot(&u, &w); in DistSqSegment3ToSegment3() local
559 sN = (b*e - c*d); in DistSqSegment3ToSegment3()
560 tN = (a*e - b*d); in DistSqSegment3ToSegment3()
578 if (-d < 0.0f) in DistSqSegment3ToSegment3()
580 else if (-d > a) in DistSqSegment3ToSegment3()
583 sN = -d; in DistSqSegment3ToSegment3()
590 if ((-d + b) < 0.0f) in DistSqSegment3ToSegment3()
592 else if ((-d + b) > a) in DistSqSegment3ToSegment3()
595 sN = (-d + b); in DistSqSegment3ToSegment3()
619 f32 b, d, e, det; in DistSqLine3ToRay3() local
624 b = VEC3Dot(&L->d, &R->d); in DistSqLine3ToRay3()
626 d = VEC3Dot(&L->d, &u); in DistSqLine3ToRay3()
627 e = VEC3Dot(&R->d, &u); in DistSqLine3ToRay3()
640 sNum = b * e - d; in DistSqLine3ToRay3()
641 tNum = e - b * d; in DistSqLine3ToRay3()
650 sNum = -d; in DistSqLine3ToRay3()
665 VEC3Add(&v, &L->P, VEC3Scale(&tmp, &L->d, s_)); in DistSqLine3ToRay3()
667 VEC3Sub(&v, &v, VEC3Scale(&tmp, &R->d, t_)); in DistSqLine3ToRay3()
679 f32 b, c, d, e, det; in DistSqLine3ToSegment3() local
684 b = VEC3Dot(&L0->d, &segDir); in DistSqLine3ToSegment3()
686 d = VEC3Dot(&L0->d, &u); in DistSqLine3ToSegment3()
701 sNum = b * e - c * d; in DistSqLine3ToSegment3()
702 tNum = e - b * d; in DistSqLine3ToSegment3()
711 sNum = -d; in DistSqLine3ToSegment3()
718 sNum = -d + b; in DistSqLine3ToSegment3()
732 VEC3Add(&v, &L0->P, VEC3Scale(&tmp, &L0->d, s_)); in DistSqLine3ToSegment3()
744 f32 b, d, e, det; in DistSqRay3ToRay3() local
749 b = VEC3Dot(&R0->d, &R1->d); in DistSqRay3ToRay3()
751 d = VEC3Dot(&R0->d, &u); in DistSqRay3ToRay3()
752 e = VEC3Dot(&R1->d, &u); in DistSqRay3ToRay3()
766 sNum = b * e - d; in DistSqRay3ToRay3()
767 tNum = e - b * d; in DistSqRay3ToRay3()
783 if (-d < 0) in DistSqRay3ToRay3()
791 sNum = -d; in DistSqRay3ToRay3()
807 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToRay3()
809 VEC3Sub(&v, &v, VEC3Scale(&tmp, &R1->d, t_)); in DistSqRay3ToRay3()
819 f32 b, c, d, e, det; in DistSqRay3ToSegment3() local
825 b = VEC3Dot(&R0->d, &segDir); in DistSqRay3ToSegment3()
827 d = VEC3Dot(&R0->d, &u); in DistSqRay3ToSegment3()
842 sNum = b * e - c * d; in DistSqRay3ToSegment3()
843 tNum = e - b * d; in DistSqRay3ToSegment3()
861 if (-d < 0.f) in DistSqRay3ToSegment3()
868 sNum = -d; in DistSqRay3ToSegment3()
876 if ((-d + b) < 0.f) in DistSqRay3ToSegment3()
883 sNum = -d + b; in DistSqRay3ToSegment3()
899 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToSegment3()
917 denom = VEC3Dot(&L->d, &J->N); in IntersectionLine3Plane()
921 if (FAbs(VEC3Dot(&J->N, &L->P) + J->d) < internal::epsilon) in IntersectionLine3Plane()
930 f32 t_ = -(VEC3Dot(&J->N, &L->P) + J->d) / denom; in IntersectionLine3Plane()
936 VEC3Add(I, &L->P, VEC3Scale(&tmp, &L->d, t_)); in IntersectionLine3Plane()
1022 b = 2.f * VEC3Dot(&L->d, &PmC); in IntersectionLine3Sphere()
1120 f32 proj = VEC3Dot(&w, &R->d); in IntersectionRay3Sphere()
1126 f32 vsq = VEC3SquareLen(&R->d); in IntersectionRay3Sphere()
1249 result = IntersectionRay3AABB_(box->Pmin.x, box->Pmax.x, R->P.x, R->d.x, tNear, tFar); in IntersectionRay3AABB()
1253 result = IntersectionRay3AABB_(box->Pmin.y, box->Pmax.y, R->P.y, R->d.y, tNear, tFar); in IntersectionRay3AABB()
1257 result = IntersectionRay3AABB_(box->Pmin.z, box->Pmax.z, R->P.z, R->d.z, tNear, tFar); in IntersectionRay3AABB()
1340 f32 s = VEC3Dot(&J->N, &C) + J->d; in IntersectionPlaneAABB()