~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/editors/space_view3d/view3d_project.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
405
405
        float line_end[3];
406
406
 
407
407
        if (rv3d->is_persp) {
408
 
                float mousevec[3];
 
408
                float mousevec[3], lambda;
409
409
                copy_v3_v3(line_sta, rv3d->viewinv[3]);
410
410
                ED_view3d_win_to_vector(ar, mval, mousevec);
411
411
                add_v3_v3v3(line_end, line_sta, mousevec);
412
412
 
413
 
                if (isect_line_plane_v3(out, line_sta, line_end, depth_pt, rv3d->viewinv[2], true) == 0) {
414
 
                        /* highly unlikely to ever happen, mouse vector parallel with view plane */
415
 
                        zero_v3(out);
416
 
                }
 
413
                /* note, we could use isect_line_plane_v3() however we want the intersection to be infront of the
 
414
                 * view no matter what, so apply the unsigned factor instead */
 
415
                lambda = line_plane_factor_v3(depth_pt, rv3d->viewinv[2], line_sta, line_end);
 
416
                interp_v3_v3v3(out, line_sta, line_end, fabsf(lambda));
417
417
        }
418
418
        else {
419
419
                float dx = (2.0f * mval[0] / (float)ar->winx) - 1.0f;