diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-14 04:45:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-14 05:00:16 +0300 |
commit | 416064cd5b6d3df577e71e301599fba36264f19b (patch) | |
tree | 38ee7e3b6dd5da0d3d283fc986d3bb58f68c43b1 /source/blender/blenlib/BLI_math_geom.h | |
parent | bbcb9c68c938980b780e92f8dcc68d5fc5359e10 (diff) |
Math Lib: ray_point_factor_v3 functions
Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 7836f12a03e..45edaca544d 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -127,6 +127,12 @@ void closest_to_plane3_v3(float r_close[3], const float plane[3], const float pt /* Set 'r' to the point in triangle (t1, t2, t3) closest to point 'p' */ void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3], const float t2[3], const float t3[3]); +float ray_point_factor_v3_ex( + const float p[3], const float ray_origin[3], const float ray_direction[3], + const float epsilon, const float fallback); +float ray_point_factor_v3( + const float p[3], const float ray_origin[3], const float ray_direction[3]); + float line_point_factor_v3_ex( const float p[3], const float l1[3], const float l2[3], const float epsilon, const float fallback); |