Skip to content

Commit

Permalink
Adjust origin for non-uniform scaling with transform tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Oct 8, 2016
1 parent 8ae58da commit 43ea2d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/TweakBrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ void TB_XForm::brushAction(mesh* m, TweakPickInfo& pickInfo, int* points, int nP
xform.PushTranslate(pick.center * -1.0f);
}
else if (xformType == 2) {
xform.PushTranslate(pick.center);
Vector3 dist(1.0f, 1.0f, 1.0f);
if (fabs(dv.x) > EPSILON)
dist.x = fabs(1.0f + dv.x / 10.0f);
Expand All @@ -1105,7 +1106,8 @@ void TB_XForm::brushAction(mesh* m, TweakPickInfo& pickInfo, int* points, int nP
else if (fabs(dv.z) > EPSILON)
dist.z = fabs(1.0f + dv.z / 10.0f);

xform.Scale(dist.x, dist.y, dist.z);
xform.PushScale(dist.x, dist.y, dist.z);
xform.PushTranslate(pick.center * -1.0f);
}
else if (xformType == 3) {
xform.PushTranslate(pick.center);
Expand Down

0 comments on commit 43ea2d2

Please sign in to comment.