From becc85c5d487b0df834bbeb6b21f3f122bdedd10 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 11 Dec 2015 11:25:24 +1100 Subject: Math Lib: 2d ray-segment intersection function --- source/blender/blenlib/BLI_math_geom.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenlib/BLI_math_geom.h') diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index bf483386752..b0421c39707 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -244,6 +244,11 @@ bool isect_ray_tri_watertight_v3_simple( const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]); +bool isect_ray_seg_v2( + const float p1[3], const float d[3], + const float v0[3], const float v1[3], + float *r_lambda, float *r_u); + /* point in polygon */ bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool use_holes); bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr, const bool use_holes); -- cgit v1.2.3