Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-20 05:42:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-20 05:42:00 +0300
commitabe36478c697a2e71fa7e92dc742704b9d583a16 (patch)
tree1bdba4dba701b1b78bf41295fb7886c95c118a75 /source/blender/editors
parentc9df0ea1474781e97f9e5fdaa84c6643f14cd889 (diff)
3D View: add clip argument to win_to_3d_on_plane
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_view3d.h4
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 0f8cd7260fd..c21a6cccb2e 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -241,11 +241,11 @@ void ED_view3d_win_to_3d_int(
float r_out[3]);
bool ED_view3d_win_to_3d_on_plane(
const struct ARegion *ar,
- const float plane[4], const float mval[2],
+ const float plane[4], const float mval[2], const bool do_clip,
float r_out[3]);
bool ED_view3d_win_to_3d_on_plane_int(
const struct ARegion *ar,
- const float plane[4], const int mval[2],
+ const float plane[4], const int mval[2], const bool do_clip,
float r_out[3]);
void ED_view3d_win_to_delta(const struct ARegion *ar, const float mval[2], float out[3], const float zfac);
void ED_view3d_win_to_origin(const struct ARegion *ar, const float mval[2], float out[3]);
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index fa166cbaaab..3cc0857c8a7 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -557,14 +557,14 @@ void ED_view3d_win_to_3d_int(
bool ED_view3d_win_to_3d_on_plane(
const ARegion *ar,
- const float plane[4], const float mval[2],
+ const float plane[4], const float mval[2], const bool do_clip,
float r_out[3])
{
float ray_co[3], ray_no[3];
ED_view3d_win_to_origin(ar, mval, ray_co);
ED_view3d_win_to_vector(ar, mval, ray_no);
float lambda;
- if (isect_ray_plane_v3(ray_co, ray_no, plane, &lambda, false)) {
+ if (isect_ray_plane_v3(ray_co, ray_no, plane, &lambda, do_clip)) {
madd_v3_v3v3fl(r_out, ray_co, ray_no, lambda);
return true;
}
@@ -573,11 +573,11 @@ bool ED_view3d_win_to_3d_on_plane(
bool ED_view3d_win_to_3d_on_plane_int(
const ARegion *ar,
- const float plane[4], const int mval[2],
+ const float plane[4], const int mval[2], const bool do_clip,
float r_out[3])
{
const float mval_fl[2] = {mval[0], mval[1]};
- return ED_view3d_win_to_3d_on_plane(ar, plane, mval_fl, r_out);
+ return ED_view3d_win_to_3d_on_plane(ar, plane, mval_fl, do_clip, r_out);
}
/**