Made models non-mirrored
This commit is contained in:
parent
942d1bc4de
commit
f8d18fdac0
1 changed files with 3 additions and 3 deletions
|
@ -107,11 +107,11 @@ QMatrix4x4 Canvas::view_matrix() const
|
||||||
QMatrix4x4 m;
|
QMatrix4x4 m;
|
||||||
if (width() > height())
|
if (width() > height())
|
||||||
{
|
{
|
||||||
m.scale(height() / float(width()), 1, 0.5);
|
m.scale(-height() / float(width()), 1, 0.5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m.scale(1, width() / float(height()), 0.5);
|
m.scale(-1, width() / float(height()), 0.5);
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ void Canvas::mouseMoveEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
auto p = event->pos();
|
auto p = event->pos();
|
||||||
auto d = p - mouse_pos;
|
auto d = p - mouse_pos;
|
||||||
yaw = fmod(yaw + d.x(), 360);
|
yaw = fmod(yaw - d.x(), 360);
|
||||||
tilt = fmax(0, fmin(180, tilt - d.y()));
|
tilt = fmax(0, fmin(180, tilt - d.y()));
|
||||||
mouse_pos = p;
|
mouse_pos = p;
|
||||||
update();
|
update();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue