From 556705f84efcb225ec1767e11167537a02553f2a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2013 19:39:10 +0000 Subject: add clip_segment_v3_plane_n() to clip a line segment to planes (as used for view clipping). use in ED_view3d_win_to_segment_clip() and fix error, was clipping by only 4 planes rather then 6. --- source/blender/blenlib/BLI_math_geom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 d24d5fb8c38..ad846823669 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -170,7 +170,8 @@ int isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const flo int isect_axial_line_tri_v3(const int axis, const float co1[3], const float co2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda); -int clip_line_plane(float p1[3], float p2[3], const float plane[4]); +bool clip_segment_v3_plane(float p1[3], float p2[3], const float plane[4]); +bool clip_segment_v3_plane_n(float p1[3], float p2[3], float plane_array[][4], const int plane_tot); void plot_line_v2v2i(const int p1[2], const int p2[2], bool (*callback)(int, int, void *), void *userData); -- cgit v1.2.3