diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 44950655ae1..3f7e41b64df 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3703,18 +3703,13 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot) /* ********************* set clipping operator ****************** */ -static void calc_clipping_plane(float clip[6][4], BoundBox *clipbb) +static void calc_clipping_plane(float clip[6][4], const BoundBox *clipbb) { int val; for (val = 0; val < 4; val++) { - normal_tri_v3(clip[val], clipbb->vec[val], clipbb->vec[val == 3 ? 0 : val + 1], clipbb->vec[val + 4]); - - /* TODO - this is just '-dot_v3v3(clip[val], clipbb->vec[val])' isnt it? - sould replace */ - clip[val][3] = -clip[val][0] * clipbb->vec[val][0] - - clip[val][1] * clipbb->vec[val][1] - - clip[val][2] * clipbb->vec[val][2]; + clip[val][3] = -dot_v3v3(clip[val], clipbb->vec[val]); } } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 7552e09ebbd..ef29f291a1e 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -606,9 +606,7 @@ void ED_view3d_clipping_calc(BoundBox *bb, float planes[4][4], bglMats *mats, co if (flip_sign) negate_v3(planes[val]); - planes[val][3] = -planes[val][0] * bb->vec[val][0] - - planes[val][1] * bb->vec[val][1] - - planes[val][2] * bb->vec[val][2]; + planes[val][3] = -dot_v3v3(planes[val], bb->vec[val]); } } |