[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56542] trunk/blender/source/blender/ editors/space_view3d: use negative dot product for clipping, rather then doing it inline.
Campbell Barton
ideasman42 at gmail.com
Wed May 8 14:53:43 CEST 2013
Revision: 56542
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56542
Author: campbellbarton
Date: 2013-05-08 12:53:43 +0000 (Wed, 08 May 2013)
Log Message:
-----------
use negative dot product for clipping, rather then doing it inline.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
trunk/blender/source/blender/editors/space_view3d/view3d_view.c
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2013-05-08 12:53:34 UTC (rev 56541)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2013-05-08 12:53:43 UTC (rev 56542)
@@ -3703,18 +3703,13 @@
/* ********************* 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]);
}
}
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_view.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_view.c 2013-05-08 12:53:34 UTC (rev 56541)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_view.c 2013-05-08 12:53:43 UTC (rev 56542)
@@ -606,9 +606,7 @@
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]);
}
}
More information about the Bf-blender-cvs
mailing list