Lines Matching refs:P
172 VEC3 P[8]; in Set() local
178 P[0].x = left; P[0].y = top; P[0].z = -n; in Set()
181 P[1].x = right; P[1].y = top; P[1].z = -n; in Set()
184 P[2].x = right; P[2].y = bottom; P[2].z = -n; in Set()
187 P[3].x = left; P[3].y = bottom; P[3].z = -n; in Set()
190 P[4].x = f_n * left; P[4].y = f_n * top; P[4].z = -f; in Set()
193 P[5].x = f_n * right; P[5].y = f_n * top; P[5].z = -f; in Set()
196 P[6].x = f_n * right; P[6].y = f_n * bottom; P[6].z = -f; in Set()
199 P[7].x = f_n * left; P[7].y = f_n * bottom; P[7].z = -f; in Set()
206 leftPlane.Set(&P0, &P[3], &P[0]); in Set()
207 rightPlane.Set(&P0, &P[1], &P[2]); in Set()
208 topPlane.Set(&P0, &P[0], &P[1]); in Set()
209 bottomPlane.Set(&P0, &P[2], &P[3]); in Set()
215 VEC3Transform(&P[i], &invCamera, &P[i]); in Set()
219 box.Set(&P[0], 8); in Set()
221 planes[0].Set(&P0, &P[3], &P[0]); // left in Set()
222 planes[1].Set(&P0, &P[1], &P[2]); // right in Set()
223 planes[2].Set(&P[0], &P[1], &P[2]); // near in Set()
224 planes[3].Set(&P[4], &P[7], &P[6]); // far in Set()
225 planes[4].Set(&P0, &P[0], &P[1]); // up in Set()
226 planes[5].Set(&P0, &P[2], &P[3]); // down in Set()
235 DistSqPoint3ToLine3(const VEC3* P, const LINE3* L, f32* t) in DistSqPoint3ToLine3() argument
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()
247 VEC3Sub(&PP_P, P, &PP); in DistSqPoint3ToLine3()
257 DistSqPoint3ToRay3(const VEC3* P, const RAY3* R, f32* t) in DistSqPoint3ToRay3() argument
262 distSq = DistSqPoint3ToLine3(P, (const LINE3*)R, &t_); in DistSqPoint3ToRay3()
269 VEC3Sub(&vec, P, &R->P); in DistSqPoint3ToRay3()
280 DistSqPoint3ToSegment3(const VEC3* P, const SEGMENT3* S, f32* t) in DistSqPoint3ToSegment3() argument
288 distSq = DistSqPoint3ToLine3(P, &L, &t_); in DistSqPoint3ToSegment3()
296 VEC3Sub(&vec, P, &S->P0); in DistSqPoint3ToSegment3()
305 VEC3Sub(&vec, P, &S->P1); in DistSqPoint3ToSegment3()
319 DistSqPoint3ToPlane(const VEC3* P, const PLANE* J, VEC3* Q) in DistSqPoint3ToPlane() argument
322 f32 k = J->Test(*P); in DistSqPoint3ToPlane()
327 VEC3Sub(Q, P, VEC3Scale(&tmp, &J->N, k)); in DistSqPoint3ToPlane()
347 DistSqPoint3ToPolyline3(const VEC3* P, const VEC3* vertices, unsigned int nVertices) in DistSqPoint3ToPolyline3() argument
358 xMinusA = vertices[0].x - P->x; in DistSqPoint3ToPolyline3()
359 yMinusB = vertices[0].y - P->y; in DistSqPoint3ToPolyline3()
360 zMinusC = vertices[0].z - P->z; in DistSqPoint3ToPolyline3()
366 xNextMinusA = vertices[1].x - P->x; in DistSqPoint3ToPolyline3()
367 yNextMinusB = vertices[1].y - P->y; in DistSqPoint3ToPolyline3()
368 zNextMinusC = vertices[1].z - P->z; in DistSqPoint3ToPolyline3()
376 dSq = DistSqPoint3ToSegment3(P, &S, NULL); in DistSqPoint3ToPolyline3()
399 f32 dSq_ = DistSqPoint3ToSegment3(P, &S2, NULL); in DistSqPoint3ToPolyline3()
415 xNextMinusA = vertices[i + 2].x - P->x; in DistSqPoint3ToPolyline3()
416 yNextMinusB = vertices[i + 2].y - P->y; in DistSqPoint3ToPolyline3()
417 zNextMinusC = vertices[i + 2].z - P->z; in DistSqPoint3ToPolyline3()
430 DistSqPoint3ToAABB(const VEC3* P, const AABB* B, VEC3* q) in DistSqPoint3ToAABB() argument
436 vv = v = P->x; in DistSqPoint3ToAABB()
450 vv = v = P->y; in DistSqPoint3ToAABB()
464 vv = v = P->z; in DistSqPoint3ToAABB()
493 VEC3Sub(&u, &L0->P, &L1->P); in DistSqLine3ToLine3()
622 VEC3Sub(&u, &L->P, &R->P); in DistSqLine3ToRay3()
665 VEC3Add(&v, &L->P, VEC3Scale(&tmp, &L->d, s_)); in DistSqLine3ToRay3()
666 VEC3Sub(&v, &v, &R->P); in DistSqLine3ToRay3()
682 VEC3Sub(&u, &L0->P, &S->P0); in DistSqLine3ToSegment3()
732 VEC3Add(&v, &L0->P, VEC3Scale(&tmp, &L0->d, s_)); in DistSqLine3ToSegment3()
747 VEC3Sub(&u, &R0->P, &R1->P); in DistSqRay3ToRay3()
807 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToRay3()
808 VEC3Sub(&v, &v, &R1->P); in DistSqRay3ToRay3()
823 VEC3Sub(&u, &R0->P, &S->P0); in DistSqRay3ToSegment3()
899 VEC3Add(&v, &R0->P, VEC3Scale(&tmp, &R0->d, s_)); in DistSqRay3ToSegment3()
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()
1020 VEC3Sub(&PmC, &L->P, &sphere->C); in IntersectionLine3Sphere()
1118 VEC3Sub(&w, &sphere->C, &R->P); 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()