MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / v_ray_intersect_plane

Function v_ray_intersect_plane

include/vecmath/dag_vecMath_common.h:1704–1711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1702VECTORCALL VECMATH_FINLINE plane3f v_norm_plane(plane3f in) { return v_norm3(in); }
1703
1704VECTORCALL VECMATH_FINLINE vec3f v_ray_intersect_plane(vec3f A, vec3f B, plane3f P, vec4f &behind, vec4f &t)
1705{
1706 vec3f dir = v_sub(B, A);
1707 vec4f dot = v_dot3(dir, P);
1708 t = v_div(v_sub(v_neg(v_splat_w(P)),v_dot3(A, P)), dot);
1709 behind = v_or(v_cmp_gt(v_zero(), t), v_cmp_eq(dot, v_zero()));
1710 return v_madd(t, dir, A);
1711}
1712
1713VECTORCALL VECMATH_FINLINE vec3f three_plane_intersection(plane3f p0, plane3f p1, plane3f p2, vec4f &invalid)
1714{

Callers

nothing calls this directly

Calls 10

v_subFunction · 0.70
v_dot3Function · 0.70
v_divFunction · 0.70
v_negFunction · 0.70
v_splat_wFunction · 0.70
v_orFunction · 0.70
v_cmp_gtFunction · 0.70
v_zeroFunction · 0.70
v_cmp_eqFunction · 0.70
v_maddFunction · 0.70

Tested by

no test coverage detected