void GLWidget::mouseMoveEvent(QMouseEvent *event) { if (isPointSelected && (event->buttons() & Qt::LeftButton)) { float x = (float)event->x(); int y = (float)event->y(); moveControlPoint(selectedPointIndex, x, y, 0.0f); isPointMoving = true; } }
void Spline::moveControlPoint(uint index, QPointF newPosition) { moveControlPoint(index, vec2(newPosition.x(), newPosition.y())); }