Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
Scotty3D
Commits
ceb34dcc
Unverified
Commit
ceb34dcc
authored
Apr 26, 2021
by
svsalem
Committed by
GitHub
Apr 26, 2021
Browse files
compacted
parent
1c58b73b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gui/widgets.cpp
View file @
ceb34dcc
...
...
@@ -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.0
f
};
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
]);
}
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment