Unverified Commit ceb34dcc authored by svsalem's avatar svsalem Committed by GitHub
Browse files

compacted

parent 1c58b73b
......@@ -182,18 +182,14 @@ Pose Widgets::apply_action(const Pose& pose) {
case Widget_Type::scale: {
if(univ_scl) {
result.scale = drag_end;
Mat4 rot = pose.rotation_mat();
Mat4 trans =
Mat4::transpose(rot) * Mat4::scale(result.scale) * rot * Mat4::scale(pose.scale);
result.scale = Vec3(trans[0][0], trans[1][1], trans[2][2]);
} else {
result.scale = Vec3{1.0f};
result.scale[(int)axis] = drag_end[(int)axis];
}
Mat4 rot = pose.rotation_mat();
Mat4 trans =
Mat4::transpose(rot) * Mat4::scale(result.scale) * rot * Mat4::scale(pose.scale);
result.scale = Vec3(trans[0][0], trans[1][1], trans[2][2]);
}
} break;
case Widget_Type::bevel: {
Vec2 off = bevel_start - bevel_end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment