diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-31 06:06:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-31 06:06:23 +0400 |
commit | 11c988ba00f2991850050ff4c2e3cb34c2546047 (patch) | |
tree | e61413337f5e8b92284569f06b553516b2675536 /source/blender/blenlib/BLI_math_geom.h | |
parent | 29f6616d609fbd92cf313b0fdec555c2fcb4ede0 (diff) |
Simplify line/plane intersection, add line_plane_factor_v3().
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used 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, 5 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 4307645bb91..559157370ca 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -97,6 +97,10 @@ void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3], float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3]); float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2]); + +float line_plane_factor_v3(const float plane_co[3], const float plane_no[3], + const float l1[3], const float l2[3]); + void limit_dist_v3(float v1[3], float v2[3], const float dist); /******************************* Intersection ********************************/ @@ -130,7 +134,7 @@ bool isect_ray_plane_v3(const float p1[3], const float d[3], bool isect_point_planes_v3(float (*planes)[4], int totplane, const float p[3]); bool isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], - const float plane_co[3], const float plane_no[3], const bool no_flip); + const float plane_co[3], const float plane_no[3]); void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3], const float plane_a_co[3], const float plane_a_no[3], |