Lines Matching refs:sphere

1016 IntersectionLine3Sphere(const LINE3* L, const SPHERE* sphere, f32* t0, f32* t1)  in IntersectionLine3Sphere()  argument
1020 VEC3Sub(&PmC, &L->P, &sphere->C); in IntersectionLine3Sphere()
1023 c = VEC3SquareLen(&PmC) - sphere->r * sphere->r; in IntersectionLine3Sphere()
1059 IntersectionRay3Sphere(const RAY3* R, const SPHERE* sphere, f32* t0, f32* t1) in IntersectionRay3Sphere() argument
1063 result = IntersectionLine3Sphere((const LINE3*)R, sphere, &t0_, &t1_); in IntersectionRay3Sphere()
1115 IntersectionRay3Sphere(const RAY3* R, const SPHERE* sphere) in IntersectionRay3Sphere() argument
1118 VEC3Sub(&w, &sphere->C, &R->P); in IntersectionRay3Sphere()
1121 f32 rsq = sphere->r * sphere->r; in IntersectionRay3Sphere()
1136 IntersectionSegment3Sphere(const SEGMENT3* S, const SPHERE* sphere, f32* t0, f32* t1) in IntersectionSegment3Sphere() argument
1144 result = IntersectionLine3Sphere(&L, sphere, &t0_, &t1_); in IntersectionSegment3Sphere()
1287 IntersectionSphereAABB(const SPHERE* sphere, const AABB* aabb) in IntersectionSphereAABB() argument
1291 if (sphere->C.x < aabb->Pmin.x) in IntersectionSphereAABB()
1292 distSq += (sphere->C.x - aabb->Pmin.x) * (sphere->C.x - aabb->Pmin.x); in IntersectionSphereAABB()
1293 else if (sphere->C.x > aabb->Pmax.x) in IntersectionSphereAABB()
1294 distSq += (sphere->C.x - aabb->Pmax.x) * (sphere->C.x - aabb->Pmax.x); in IntersectionSphereAABB()
1296 if (sphere->C.y < aabb->Pmin.y) in IntersectionSphereAABB()
1297 distSq += (sphere->C.y - aabb->Pmin.y) * (sphere->C.y - aabb->Pmin.y); in IntersectionSphereAABB()
1298 else if (sphere->C.y > aabb->Pmax.y) in IntersectionSphereAABB()
1299 distSq += (sphere->C.y - aabb->Pmax.y) * (sphere->C.y - aabb->Pmax.y); in IntersectionSphereAABB()
1301 if (sphere->C.z < aabb->Pmin.z) in IntersectionSphereAABB()
1302 distSq += (sphere->C.z - aabb->Pmin.z) * (sphere->C.z - aabb->Pmin.z); in IntersectionSphereAABB()
1303 else if (sphere->C.z > aabb->Pmax.z) in IntersectionSphereAABB()
1304 distSq += (sphere->C.z - aabb->Pmax.z) * (sphere->C.z - aabb->Pmax.z); in IntersectionSphereAABB()
1306 if (distSq <= sphere->r * sphere->r) in IntersectionSphereAABB()