75 this->gridMatrix = glm::rotate(this->gridMatrix, PI<float> / 2, glm::vec3{0, 1, 0}); |
75 this->gridMatrix = glm::rotate(this->gridMatrix, PI<float> / 2, glm::vec3{0, 1, 0}); |
76 } |
76 } |
77 this->updateGridMatrix(); |
77 this->updateGridMatrix(); |
78 this->update(); |
78 this->update(); |
79 } |
79 } |
80 MouseMoveInfo info; |
80 Q_EMIT this->mouseMove(this); |
81 info.invoker = this; |
|
82 info.worldPosition = this->worldPosition; |
|
83 emit mouseMove(info); |
|
84 PartRenderer::mouseMoveEvent(event); |
81 PartRenderer::mouseMoveEvent(event); |
85 } |
82 } |
86 |
83 |
87 void Canvas::mousePressEvent(QMouseEvent* event) |
84 void Canvas::mousePressEvent(QMouseEvent* event) |
88 { |
85 { |
93 |
90 |
94 void Canvas::mouseReleaseEvent(QMouseEvent* event) |
91 void Canvas::mouseReleaseEvent(QMouseEvent* event) |
95 { |
92 { |
96 if (this->totalMouseMove < (2.0 / sqrt(2)) * 5.0) |
93 if (this->totalMouseMove < (2.0 / sqrt(2)) * 5.0) |
97 { |
94 { |
98 MouseClickInfo info; |
95 Q_EMIT this->mouseClick(this); |
99 info.worldPosition = this->worldPosition; |
|
100 info.invoker = this; |
|
101 emit mouseClick(info); |
|
102 } |
96 } |
103 PartRenderer::mouseReleaseEvent(event); |
97 PartRenderer::mouseReleaseEvent(event); |
104 } |
98 } |
105 |
99 |
106 void Canvas::initializeGL() |
100 void Canvas::initializeGL() |