[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30770] trunk/blender/source/blender/ editors/space_view3d/view3d_edit.c: patch from Roelf De Kock (kiemdoder), removes redundant values from the snapquats[] array.

Campbell Barton ideasman42 at gmail.com
Mon Jul 26 21:57:46 CEST 2010


Revision: 30770
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30770
Author:   campbellbarton
Date:     2010-07-26 21:57:44 +0200 (Mon, 26 Jul 2010)

Log Message:
-----------
patch from Roelf De Kock (kiemdoder), removes redundant values from the snapquats[] array.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2010-07-26 19:48:35 UTC (rev 30769)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2010-07-26 19:57:44 UTC (rev 30770)
@@ -402,49 +402,49 @@
 #define COS45 0.70710678118654746
 #define SIN45 COS45
 
-static float snapquats[39][6] = {
-	/*{q0, q1, q3, q4, view, opposite_direction}*/
-{COS45, -SIN45, 0.0, 0.0, RV3D_VIEW_FRONT, 0},  //front
-{0.0, 0.0, -SIN45, -SIN45, RV3D_VIEW_BACK, 0}, //back
-{1.0, 0.0, 0.0, 0.0, RV3D_VIEW_TOP, 0},       //top
-{0.0, -1.0, 0.0, 0.0, RV3D_VIEW_BOTTOM, 0},      //bottom
-{0.5, -0.5, -0.5, -0.5, RV3D_VIEW_RIGHT, 0},    //left
-{0.5, -0.5, 0.5, 0.5, RV3D_VIEW_LEFT, 0},      //right
+static float snapquats[39][5] = {
+	/*{q0, q1, q3, q4, view}*/
+	{COS45, -SIN45, 0.0, 0.0, RV3D_VIEW_FRONT},  //front
+	{0.0, 0.0, -SIN45, -SIN45, RV3D_VIEW_BACK}, //back
+	{1.0, 0.0, 0.0, 0.0, RV3D_VIEW_TOP},       //top
+	{0.0, -1.0, 0.0, 0.0, RV3D_VIEW_BOTTOM},      //bottom
+	{0.5, -0.5, -0.5, -0.5, RV3D_VIEW_RIGHT},    //left
+	{0.5, -0.5, 0.5, 0.5, RV3D_VIEW_LEFT},      //right
 
 	/* some more 45 deg snaps */
-{0.65328145027160645, -0.65328145027160645, 0.27059805393218994, 0.27059805393218994, 0, 0},
-{0.92387950420379639, 0.0, 0.0, 0.38268342614173889, 0, 0},
-{0.0, -0.92387950420379639, 0.38268342614173889, 0.0, 0, 0},
-{0.35355335474014282, -0.85355335474014282, 0.35355338454246521, 0.14644660055637360, 0, 0},
-{0.85355335474014282, -0.35355335474014282, 0.14644660055637360, 0.35355338454246521, 0, 0},
-{0.49999994039535522, -0.49999994039535522, 0.49999997019767761, 0.49999997019767761, 0, 0},
-{0.27059802412986755, -0.65328145027160645, 0.65328145027160645, 0.27059802412986755, 0, 0},
-{0.65328145027160645, -0.27059802412986755, 0.27059802412986755, 0.65328145027160645, 0, 0},
-{0.27059799432754517, -0.27059799432754517, 0.65328139066696167, 0.65328139066696167, 0, 0},
-{0.38268336653709412, 0.0, 0.0, 0.92387944459915161, 0, 0},
-{0.0, -0.38268336653709412, 0.92387944459915161, 0.0, 0, 0},
-{0.14644658565521240, -0.35355335474014282, 0.85355335474014282, 0.35355335474014282, 0, 0},
-{0.35355335474014282, -0.14644658565521240, 0.35355335474014282, 0.85355335474014282, 0, 0},
-{0.0, 0.0, 0.92387944459915161, 0.38268336653709412, 0, 0},
-{-0.0, 0.0, 0.38268336653709412, 0.92387944459915161, 0, 0},
-{-0.27059802412986755, 0.27059802412986755, 0.65328133106231689, 0.65328133106231689, 0, 0},
-{-0.38268339633941650, 0.0, 0.0, 0.92387938499450684, 0, 0},
-{0.0, 0.38268339633941650, 0.92387938499450684, 0.0, 0, 0},
-{-0.14644658565521240, 0.35355338454246521, 0.85355329513549805, 0.35355332493782043, 0, 0},
-{-0.35355338454246521, 0.14644658565521240, 0.35355332493782043, 0.85355329513549805, 0, 0},
-{-0.49999991059303284, 0.49999991059303284, 0.49999985098838806, 0.49999985098838806, 0, 0},
-{-0.27059799432754517, 0.65328145027160645, 0.65328139066696167, 0.27059799432754517, 0, 0},
-{-0.65328145027160645, 0.27059799432754517, 0.27059799432754517, 0.65328139066696167, 0, 0},
-{-0.65328133106231689, 0.65328133106231689, 0.27059793472290039, 0.27059793472290039, 0, 0},
-{-0.92387932538986206, 0.0, 0.0, 0.38268333673477173, 0, 0},
-{0.0, 0.92387932538986206, 0.38268333673477173, 0.0, 0, 0},
-{-0.35355329513549805, 0.85355329513549805, 0.35355329513549805, 0.14644657075405121, 0, 0},
-{-0.85355329513549805, 0.35355329513549805, 0.14644657075405121, 0.35355329513549805, 0, 0},
-{-0.38268330693244934, 0.92387938499450684, 0.0, 0.0, 0, 0},
-{-0.92387938499450684, 0.38268330693244934, 0.0, 0.0, 0, 0},
-{-COS45, 0.0, 0.0, SIN45, 0, 0},
-{COS45, 0.0, 0.0, SIN45, 0, 0},
-{0.0, 0.0, 0.0, 1.0, 0, 0}
+	{0.65328145027160645, -0.65328145027160645, 0.27059805393218994, 0.27059805393218994, 0},
+	{0.92387950420379639, 0.0, 0.0, 0.38268342614173889, 0},
+	{0.0, -0.92387950420379639, 0.38268342614173889, 0.0, 0},
+	{0.35355335474014282, -0.85355335474014282, 0.35355338454246521, 0.14644660055637360, 0},
+	{0.85355335474014282, -0.35355335474014282, 0.14644660055637360, 0.35355338454246521, 0},
+	{0.49999994039535522, -0.49999994039535522, 0.49999997019767761, 0.49999997019767761, 0},
+	{0.27059802412986755, -0.65328145027160645, 0.65328145027160645, 0.27059802412986755, 0},
+	{0.65328145027160645, -0.27059802412986755, 0.27059802412986755, 0.65328145027160645, 0},
+	{0.27059799432754517, -0.27059799432754517, 0.65328139066696167, 0.65328139066696167, 0},
+	{0.38268336653709412, 0.0, 0.0, 0.92387944459915161, 0},
+	{0.0, -0.38268336653709412, 0.92387944459915161, 0.0, 0},
+	{0.14644658565521240, -0.35355335474014282, 0.85355335474014282, 0.35355335474014282, 0},
+	{0.35355335474014282, -0.14644658565521240, 0.35355335474014282, 0.85355335474014282, 0},
+	{0.0, 0.0, 0.92387944459915161, 0.38268336653709412, 0},
+	{-0.0, 0.0, 0.38268336653709412, 0.92387944459915161, 0},
+	{-0.27059802412986755, 0.27059802412986755, 0.65328133106231689, 0.65328133106231689, 0},
+	{-0.38268339633941650, 0.0, 0.0, 0.92387938499450684, 0},
+	{0.0, 0.38268339633941650, 0.92387938499450684, 0.0, 0},
+	{-0.14644658565521240, 0.35355338454246521, 0.85355329513549805, 0.35355332493782043, 0},
+	{-0.35355338454246521, 0.14644658565521240, 0.35355332493782043, 0.85355329513549805, 0},
+	{-0.49999991059303284, 0.49999991059303284, 0.49999985098838806, 0.49999985098838806, 0},
+	{-0.27059799432754517, 0.65328145027160645, 0.65328139066696167, 0.27059799432754517, 0},
+	{-0.65328145027160645, 0.27059799432754517, 0.27059799432754517, 0.65328139066696167, 0},
+	{-0.65328133106231689, 0.65328133106231689, 0.27059793472290039, 0.27059793472290039, 0},
+	{-0.92387932538986206, 0.0, 0.0, 0.38268333673477173, 0},
+	{0.0, 0.92387932538986206, 0.38268333673477173, 0.0, 0},
+	{-0.35355329513549805, 0.85355329513549805, 0.35355329513549805, 0.14644657075405121, 0},
+	{-0.85355329513549805, 0.35355329513549805, 0.14644657075405121, 0.35355329513549805, 0},
+	{-0.38268330693244934, 0.92387938499450684, 0.0, 0.0, 0},
+	{-0.92387938499450684, 0.38268330693244934, 0.0, 0.0, 0},
+	{-COS45, 0.0, 0.0, SIN45, 0},
+	{COS45, 0.0, 0.0, SIN45, 0},
+	{0.0, 0.0, 0.0, 1.0, 0}
 };
 
 enum {





More information about the Bf-blender-cvs mailing list