diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-22 23:39:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-22 23:39:10 +0400 |
commit | 556705f84efcb225ec1767e11167537a02553f2a (patch) | |
tree | 0bae9ac5ebb960b9845b7428b51a61cea28e4ca4 /source/blender/blenlib/BLI_math_geom.h | |
parent | bf51e807991b004de079736dfaeae6b642eaae4a (diff) |
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.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |