Unsolved how to find the partial line segment inside the QPolygonF
-
I have a
QLineF line
QPolygonF polygonThis Line is Partially inside the and partially outside the polygon . I check with documentation http://doc.qt.io/qt-4.8/qlinef-members.html and http://doc.qt.io/qt-4.8/qpolygonf-members.html
I want to get coordinates of segments of QLineF which is inside the polygon
I could not way to find the coordinates of QLineF which is inside
-
@Qt-Enthusiast
QPolygonF
is actually a QVector of QLineF objects. So you are easily able to iterate over them.
The rest "simply" is then plain mathematics. -
I was looking for some optimized algorithm for the same .May be O(n) complexsity
-
@Qt-Enthusiast You can ask Google
-
@Qt-Enthusiast
yes, but this is out-of-scope for Qt since this is solvable with mathematics.
I am sure you can find various algorithms/formulas on the web for this.