| 1932 | } |
| 1933 | |
| 1934 | VECTORCALL VECMATH_FINLINE int v_sphere_intersect(vec3f center, vec3f r, |
| 1935 | vec3f plane03X, const vec4f& plane03Y, const vec4f& plane03Z, const vec4f& plane03W, |
| 1936 | const vec4f& plane4, const vec4f& plane5) |
| 1937 | { |
| 1938 | vec4f res03; |
| 1939 | res03 = v_madd(v_splat_x(center), plane03X, plane03W); |
| 1940 | res03 = v_madd(v_splat_y(center), plane03Y, res03); |
| 1941 | res03 = v_madd(v_splat_z(center), plane03Z, res03); |
| 1942 | res03 = v_add(res03, r); |
| 1943 | res03 = v_or(res03, v_add(v_add(v_dot3(center, plane4), r), v_splat_w(plane4))); |
| 1944 | res03 = v_or(res03, v_add(v_add(v_dot3(center, plane5), r), v_splat_w(plane5))); |
| 1945 | |
| 1946 | if (v_test_vec_mask_neq_0(res03)) |
| 1947 | return 0; |
| 1948 | |
| 1949 | res03 = v_madd(v_splat_x(center), plane03X, plane03W); |
| 1950 | res03 = v_madd(v_splat_y(center), plane03Y, res03); |
| 1951 | res03 = v_madd(v_splat_z(center), plane03Z, res03); |
| 1952 | res03 = v_sub(res03, r); |
| 1953 | res03 = v_or(res03, v_add(v_sub(v_dot3(center, plane4), r), v_splat_w(plane4))); |
| 1954 | res03 = v_or(res03, v_add(v_sub(v_dot3(center, plane5), r), v_splat_w(plane5))); |
| 1955 | |
| 1956 | return v_test_vec_mask_neq_0(res03) + 1; |
| 1957 | } |
| 1958 | |
| 1959 | VECTORCALL VECMATH_FINLINE int v_is_visible_box_extent2(vec3f center, vec3f extent,//center and extent should be multiplied by 2 |
| 1960 | vec4f plane03X, const vec4f& plane03Y, const vec4f& plane03Z, const vec4f& plane03W2, |
nothing calls this directly
no test coverage detected