Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r--source/blender/editors/transform/transform_manipulator.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 51698c27b37..030ad190dc3 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 */
@@ -1197,7 +1187,7 @@ static void draw_cylinder(GLUquadricObj *qobj, float len, float width)
}
-static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo, int colcode)
+static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUSED(moving), int drawflags, int combo, int colcode)
{
GLUquadricObj *qobj;
float cylen= 0.01f*(float)U.tw_handlesize;
@@ -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 ) {