From 3a0e563feb08233217f937ac7040be66d062a73b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Oct 2010 03:23:44 +0000 Subject: bugfix [#23191] Ctrl-LMB quick extrude problem with non-perpendicular edges/faces. also remove is_mat4_flipped() from transform_manipulator.c. --- .../editors/transform/transform_manipulator.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/transform/transform_manipulator.c') diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 51698c27b37..1d32f893b80 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -101,16 +101,6 @@ #define MAN_GHOST 1 #define MAN_MOVECOL 2 - -static int is_mat4_flipped(float mat[][4]) -{ - float vec[3]; - - cross_v3_v3v3(vec, mat[0], mat[1]); - if( dot_v3v3(vec, mat[2]) < 0.0 ) return 1; - return 0; -} - /* transform widget center calc helper for below */ static void calc_tw_center(Scene *scene, float *co) { @@ -753,7 +743,7 @@ static void preOrthoFront(int ortho, float twmat[][4], int axis) orthogonalize_m4(omat, axis); glPushMatrix(); glMultMatrixf(omat); - glFrontFace( is_mat4_flipped(omat)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(omat) ? GL_CW:GL_CCW); } } @@ -850,12 +840,12 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving, // XXX mul_m4_m3m4(matt, t->mat, rv3d->twmat); if (ortho) { glMultMatrixf(matt); - glFrontFace( is_mat4_flipped(matt)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(matt) ? GL_CW:GL_CCW); } } else { if (ortho) { - glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(rv3d->twmat) ? GL_CW:GL_CCW); glMultMatrixf(rv3d->twmat); } } @@ -1116,11 +1106,11 @@ static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving, copy_m4_m4(matt, rv3d->twmat); // to copy the parts outside of [3][3] // XXX mul_m4_m3m4(matt, t->mat, rv3d->twmat); glMultMatrixf(matt); - glFrontFace( is_mat4_flipped(matt)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(matt) ? GL_CW:GL_CCW); } else { glMultMatrixf(rv3d->twmat); - glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(rv3d->twmat) ? GL_CW:GL_CCW); } /* axis */ @@ -1327,7 +1317,7 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov glMultMatrixf(rv3d->twmat); } - glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW); + glFrontFace(is_negative_m4(rv3d->twmat) ? GL_CW:GL_CCW); /* axis */ if( (G.f & G_PICKSEL)==0 ) { -- cgit v1.2.3