diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-26 23:57:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-26 23:57:44 +0400 |
commit | aac34d8e9404ee8fa2f0363feebd36967f743658 (patch) | |
tree | fa8eacf28933a5323c4940a631e15e86b535f687 /source/blender/editors/space_view3d/view3d_edit.c | |
parent | 982615ff1b6722b7b2a0cbb8933f06a796db614b (diff) |
patch from Roelf De Kock (kiemdoder), removes redundant values from the snapquats[] array.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 8ed987d21fb..f4fbb501fc3 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -402,49 +402,49 @@ static const float thres = 0.93f; //cos(20 deg); #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 { |