The VSplinePath class keep information about splinePath. More...
#include <vsplinepath.h>
Public Member Functions | |
| VSplinePath (quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VSplinePath constructor. More... | |
| VSplinePath (const QVector< VFSplinePoint > &points, qreal kCurve=1, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VSplinePath (const QVector< VSplinePoint > &points, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VSplinePath (const VSplinePath &splPath) | |
| VSplinePath copy constructor. More... | |
| VSplinePath | Rotate (const QPointF &originPoint, qreal degrees, const QString &prefix=QString()) const |
| VSplinePath | Flip (const QLineF &axis, const QString &prefix=QString()) const |
| VSplinePath | Move (qreal length, qreal angle, const QString &prefix=QString()) const |
| virtual | ~VSplinePath () Q_DECL_OVERRIDE |
| VSplinePoint & | operator[] (int indx) |
| operator [] return spline point by index. More... | |
| VSplinePath & | operator= (const VSplinePath &path) |
| operator = assignment operator. More... | |
| void | Swap (VSplinePath &path) Q_DECL_NOTHROW |
| void | append (const VSplinePoint &point) |
| append add point in the end of list points. More... | |
| virtual qint32 | CountSubSpl () const Q_DECL_OVERRIDE |
| CountSubSpl return count of simple splines. More... | |
| virtual qint32 | CountPoints () const Q_DECL_OVERRIDE |
| CountPoints return count of points. More... | |
| virtual void | Clear () Q_DECL_OVERRIDE |
| Clear clear list of points. More... | |
| virtual VSpline | GetSpline (qint32 index) const Q_DECL_OVERRIDE |
| GetSpline return spline by index. More... | |
| virtual QVector< VSplinePoint > | GetSplinePath () const Q_DECL_OVERRIDE |
| GetSplinePath return list with spline points. More... | |
| QVector< VFSplinePoint > | GetFSplinePath () const |
| virtual qreal | GetStartAngle () const Q_DECL_OVERRIDE |
| virtual qreal | GetEndAngle () const Q_DECL_OVERRIDE |
| virtual qreal | GetC1Length () const Q_DECL_OVERRIDE |
| virtual qreal | GetC2Length () const Q_DECL_OVERRIDE |
| void | UpdatePoint (qint32 indexSpline, const SplinePointPosition &pos, const VSplinePoint &point) |
| UpdatePoint update spline point in list. More... | |
| VSplinePoint | GetSplinePoint (qint32 indexSpline, SplinePointPosition pos) const |
| GetSplinePoint return spline point from list. More... | |
| const VSplinePoint & | at (int indx) const |
| at return spline point by index. More... | |
| virtual VPointF | FirstPoint () const Q_DECL_OVERRIDE |
| virtual VPointF | LastPoint () const Q_DECL_OVERRIDE |
Public Member Functions inherited from VAbstractCubicBezierPath | |
| VAbstractCubicBezierPath (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractCubicBezierPath (const VAbstractCubicBezierPath &curve) | |
| VAbstractCubicBezierPath & | operator= (const VAbstractCubicBezierPath &curve) |
| virtual | ~VAbstractCubicBezierPath () |
| virtual QPainterPath | GetPath () const Q_DECL_OVERRIDE |
| GetPath return QPainterPath which reprezent spline path. More... | |
| virtual QVector< QPointF > | getPoints () const Q_DECL_OVERRIDE |
| GetPathPoints return list of points what located on path. More... | |
| virtual qreal | GetLength () const Q_DECL_OVERRIDE |
| GetLength return length of spline path. More... | |
| virtual QVector< DirectionArrow > | DirectionArrows () const Q_DECL_OVERRIDE |
| int | Segment (const QPointF &p) const |
| QPointF | CutSplinePath (qreal length, qint32 &p1, qint32 &p2, QPointF &spl1p2, QPointF &spl1p3, QPointF &spl2p2, QPointF &spl2p3) const |
| CutSplinePath cut spline path into two. This method don't return two spline path. You must create spline paths by yourself. Example: QPointF spl1p2, spl1p3, spl2p2, spl2p3; qint32 p1 = 0, p2 = 0; QPointF point = splPath->CutSplinePath(length, p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);. More... | |
| virtual QString | NameForHistory (const QString &toolName) const Q_DECL_OVERRIDE |
| NameForHistory helps to create name for dialog History. More... | |
Public Member Functions inherited from VAbstractBezier | |
| VAbstractBezier (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractBezier (const VAbstractBezier &curve) | |
| VAbstractBezier & | operator= (const VAbstractBezier &curve) |
| virtual | ~VAbstractBezier () |
Public Member Functions inherited from VAbstractCurve | |
| VAbstractCurve (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractCurve (const VAbstractCurve &curve) | |
| virtual | ~VAbstractCurve () Q_DECL_OVERRIDE |
| VAbstractCurve & | operator= (const VAbstractCurve &curve) |
| void | Swap (VAbstractCurve &curve) Q_DECL_NOTHROW |
| QVector< QPointF > | GetSegmentPoints (const QPointF &begin, const QPointF &end, bool reverse=false) const |
| qreal | GetLengthByPoint (const QPointF &point) const |
| virtual QVector< QPointF > | IntersectLine (const QLineF &line) const |
| IntersectLine return list of points for real intersection with line. More... | |
| virtual bool | IsIntersectLine (const QLineF &line) const |
| bool | isPointOnCurve (const QPointF &p) const |
| quint32 | GetDuplicate () const |
| void | SetDuplicate (quint32 number) |
| QString | getLineColor () const |
| void | setLineColor (const QString &color) |
| QString | GetPenStyle () const |
| void | SetPenStyle (const QString &penStyle) |
| QString | getLineWeight () const |
| getLineWeight return weight of the lines More... | |
| void | setLineWeight (const QString &lineWeight) |
| setLineWeight set weight of the lines More... | |
| QPointF | getFirstPoint () |
| QPointF | getLastPoint () |
Public Member Functions inherited from VGObject | |
| VGObject () | |
| VGObject default constructor. More... | |
| VGObject (const GOType &type, const quint32 &idObject=0, const Draw &mode=Draw::Calculation) | |
| VGObject constructor. More... | |
| VGObject (const VGObject &obj) | |
| VGObject copy constructor. More... | |
| virtual | ~VGObject () |
| VGObject & | operator= (const VGObject &obj) |
| operator = assignment operator. More... | |
| void | Swap (VGObject &obj) Q_DECL_NOTHROW |
| quint32 | getIdObject () const |
| getIdObject return parent id. More... | |
| void | setIdObject (const quint32 &value) |
| setIdObject set parent id. More... | |
| virtual QString | name () const |
| name return name graphical object. More... | |
| void | setName (const QString &name) |
| setName set name graphical object. More... | |
| Draw | getMode () const |
| getMode return mode creation. More... | |
| void | setMode (const Draw &value) |
| setMode set mode creation. More... | |
| GOType | getType () const |
| getType return object type. More... | |
| void | setType (const GOType &type) |
| quint32 | id () const |
| id return id object. More... | |
| virtual void | setId (const quint32 &id) |
| setId set id object. More... | |
| quint32 | getIdTool () const |
Private Attributes | |
| QSharedDataPointer< VSplinePathData > | d |
Additional Inherited Members | |
Static Public Member Functions inherited from VAbstractCurve | |
| static QVector< QPointF > | GetSegmentPoints (const QVector< QPointF > &points, const QPointF &begin, const QPointF &end, bool reverse=false) |
| static bool | isPointOnCurve (const QVector< QPointF > &points, const QPointF &p) |
| static qreal | PathLength (const QVector< QPointF > &path) |
| static QVector< QPointF > | CurveIntersectLine (const QVector< QPointF > &points, const QLineF &line) |
| static QPainterPath | ShowDirection (const QVector< DirectionArrow > &arrows, qreal width) |
Static Public Member Functions inherited from VGObject | |
| static QLineF | BuildLine (const QPointF &p1, const qreal &length, const qreal &angle) |
| static QPointF | BuildRay (const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p1, const QPointF &p2, const QRectF &scRect) |
| static int | ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) |
| static QPointF | LineIntersectRect (const QRectF &rec, const QLineF &line) |
| LineIntersectRect find point intersection line and rect. More... | |
| static int | IntersectionCircles (const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2) |
| static qint32 | LineIntersectCircle (const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) |
| LineIntersectCircle find point intersection line and circle. More... | |
| static QPointF | ClosestPoint (const QLineF &line, const QPointF &point) |
| ClosestPoint find point projection of point onto line. More... | |
| static QPointF | addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) |
| static void | LineCoefficients (const QLineF &line, qreal *a, qreal *b, qreal *c) |
| LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0. More... | |
| static bool | IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineSegment Check if the point is on the line segment. More... | |
| static bool | IsPointOnLineviaPDP (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineviaPDP use the perp dot product (PDP) way. More... | |
| template<typename T > | |
| static QVector< T > | GetReversePoints (const QVector< T > &points) |
| GetReversePoint return revers container of points. More... | |
| static int | GetLengthContour (const QVector< QPointF > &contour, const QVector< QPointF > &newPoints) |
| GetLengthContour return length of contour. More... | |
Static Public Attributes inherited from VAbstractCurve | |
| static const qreal | lengthCurveDirectionArrow = 14 |
Static Public Attributes inherited from VGObject | |
| static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Protected Member Functions inherited from VAbstractCubicBezierPath | |
| virtual void | CreateName () Q_DECL_OVERRIDE |
Static Protected Member Functions inherited from VGObject | |
| static QTransform | flipTransform (const QLineF &axis) |
The VSplinePath class keep information about splinePath.
Definition at line 71 of file vsplinepath.h.
|
explicit |
VSplinePath constructor.
| idObject | parent id. |
| mode | mode creation spline path. |
Definition at line 74 of file vsplinepath.cpp.
References SplinePath.
| VSplinePath::VSplinePath | ( | const QVector< VFSplinePoint > & | points, |
| qreal | kCurve = 1, |
||
| quint32 | idObject = 0, |
||
| Draw | mode = Draw::Calculation |
||
| ) |
Definition at line 80 of file vsplinepath.cpp.
References VFSplinePoint::Angle1(), VFSplinePoint::Angle2(), VAbstractCubicBezierPath::CreateName(), d, VSpline::GetC1Length(), VSpline::GetC1LengthFormula(), VSpline::GetC2Length(), VSpline::GetC2LengthFormula(), VSpline::GetEndAngleFormula(), VSpline::GetStartAngleFormula(), VFSplinePoint::KAsm1(), VFSplinePoint::KAsm2(), VFSplinePoint::P(), and SplinePath.
| VSplinePath::VSplinePath | ( | const QVector< VSplinePoint > & | points, |
| quint32 | idObject = 0, |
||
| Draw | mode = Draw::Calculation |
||
| ) |
Definition at line 110 of file vsplinepath.cpp.
References VAbstractCubicBezierPath::CreateName(), d, and SplinePath.
| VSplinePath::VSplinePath | ( | const VSplinePath & | splPath | ) |
VSplinePath copy constructor.
| splPath | spline path. |
Definition at line 128 of file vsplinepath.cpp.
|
virtual |
Definition at line 209 of file vsplinepath.cpp.
| void VSplinePath::append | ( | const VSplinePoint & | point | ) |
append add point in the end of list points.
| point | new point. |
Definition at line 217 of file vsplinepath.cpp.
References VAbstractCubicBezierPath::CreateName(), d, and VSplinePoint::P().
| const VSplinePoint & VSplinePath::at | ( | int | indx | ) | const |
at return spline point by index.
| indx | index in list. |
Definition at line 350 of file vsplinepath.cpp.
References d.
Referenced by DialogSplinePath::currentPointChanged(), DialogSplinePath::SetPath(), and VToolSplinePath::UpdatePathPoints().
|
virtual |
Clear clear list of points.
Implements VAbstractCubicBezierPath.
Definition at line 483 of file vsplinepath.cpp.
References d, and VAbstractCurve::SetDuplicate().
Referenced by DialogSplinePath::SavePath().
|
virtual |
CountPoints return count of points.
Implements VAbstractCubicBezierPath.
Definition at line 439 of file vsplinepath.cpp.
References d.
Referenced by DialogSplinePath::ChosenObject(), DialogSplinePath::currentPointChanged(), Flip(), GetC1Length(), GetC2Length(), GetEndAngle(), GetSpline(), GetStartAngle(), DialogSplinePath::IsPathValid(), Move(), VisToolSplinePath::RefreshGeometry(), Rotate(), DialogSplinePath::SetPath(), DialogSplinePath::ShowDialog(), and VToolSplinePath::UpdatePathPoints().
|
virtual |
CountSubSpl return count of simple splines.
Implements VAbstractCubicBezierPath.
Definition at line 233 of file vsplinepath.cpp.
References d.
Referenced by Flip(), GetFSplinePath(), GetSpline(), GetSplinePoint(), LastPoint(), Move(), VisToolSplinePath::RefreshGeometry(), Rotate(), and UpdatePoint().
|
virtual |
| VSplinePath VSplinePath::Flip | ( | const QLineF & | axis, |
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 159 of file vsplinepath.cpp.
References CountPoints(), CountSubSpl(), VSpline::Flip(), VSpline::GetC1Length(), VSpline::GetC1LengthFormula(), VSpline::GetC2Length(), VSpline::GetC2LengthFormula(), VSpline::GetEndAngle(), VSpline::GetEndAngleFormula(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VSpline::GetP1(), VSpline::GetP4(), VAbstractCurve::GetPenStyle(), GetSpline(), VSpline::GetStartAngle(), VSpline::GetStartAngleFormula(), VGObject::name(), and splPath.
|
virtual |
Implements VAbstractBezier.
Definition at line 382 of file vsplinepath.cpp.
References CountPoints(), and GetSplinePath().
|
virtual |
Implements VAbstractBezier.
Definition at line 395 of file vsplinepath.cpp.
References CountPoints(), and GetSplinePath().
|
virtual |
Implements VAbstractCurve.
Definition at line 369 of file vsplinepath.cpp.
References CountPoints(), and GetSplinePath().
| QVector< VFSplinePoint > VSplinePath::GetFSplinePath | ( | ) | const |
Definition at line 455 of file vsplinepath.cpp.
References VSplinePoint::Angle1(), VSplinePoint::Angle1Formula(), VSplinePoint::Angle2(), VSplinePoint::Angle2Formula(), CountSubSpl(), d, VSpline::GetKasm1(), VSpline::GetKasm2(), VSplinePoint::Length1(), VSplinePoint::Length1Formula(), VSplinePoint::Length2(), VSplinePoint::Length2Formula(), and VSplinePoint::P().
|
virtual |
GetSpline return spline by index.
| index | index spline in spline path. |
Implements VAbstractCubicBezierPath.
Definition at line 251 of file vsplinepath.cpp.
References VSplinePoint::Angle1(), VSplinePoint::Angle1Formula(), VSplinePoint::Angle2(), VSplinePoint::Angle2Formula(), CountPoints(), CountSubSpl(), d, VSplinePoint::Length1(), VSplinePoint::Length1Formula(), VSplinePoint::Length2(), VSplinePoint::Length2Formula(), and VSplinePoint::P().
Referenced by VisToolSplinePath::Creating(), Flip(), Move(), VisToolSplinePath::RefreshGeometry(), and Rotate().
|
virtual |
GetSplinePath return list with spline points.
Implements VAbstractCubicBezierPath.
Definition at line 449 of file vsplinepath.cpp.
References d.
Referenced by GetC1Length(), GetC2Length(), GetEndAngle(), GetStartAngle(), and VisToolSplinePath::RefreshGeometry().
| VSplinePoint VSplinePath::GetSplinePoint | ( | qint32 | indexSpline, |
| SplinePointPosition | pos | ||
| ) | const |
GetSplinePoint return spline point from list.
| indexSpline | spline index in list. |
| pos | position point in spline. |
Definition at line 300 of file vsplinepath.cpp.
References CountSubSpl(), d, and FirstPoint.
|
virtual |
Implements VAbstractCurve.
Definition at line 356 of file vsplinepath.cpp.
References CountPoints(), and GetSplinePath().
|
virtual |
Implements VAbstractCubicBezierPath.
Definition at line 421 of file vsplinepath.cpp.
References CountSubSpl(), and d.
| VSplinePath VSplinePath::Move | ( | qreal | length, |
| qreal | angle, | ||
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 184 of file vsplinepath.cpp.
References CountPoints(), CountSubSpl(), VSpline::GetC1Length(), VSpline::GetC1LengthFormula(), VSpline::GetC2Length(), VSpline::GetC2LengthFormula(), VSpline::GetEndAngle(), VSpline::GetEndAngleFormula(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VSpline::GetP1(), VSpline::GetP4(), VAbstractCurve::GetPenStyle(), GetSpline(), VSpline::GetStartAngle(), VSpline::GetStartAngleFormula(), VSpline::Move(), VGObject::name(), and splPath.
| VSplinePath & VSplinePath::operator= | ( | const VSplinePath & | path | ) |
operator = assignment operator.
| path | spline path. |
Definition at line 322 of file vsplinepath.cpp.
References d, and VAbstractCurve::operator=().
| VSplinePoint & VSplinePath::operator[] | ( | int | indx | ) |
operator [] return spline point by index.
| indx | index in list. |
Definition at line 339 of file vsplinepath.cpp.
References d.
| VSplinePath VSplinePath::Rotate | ( | const QPointF & | originPoint, |
| qreal | degrees, | ||
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 134 of file vsplinepath.cpp.
References CountPoints(), CountSubSpl(), VSpline::GetC1Length(), VSpline::GetC1LengthFormula(), VSpline::GetC2Length(), VSpline::GetC2LengthFormula(), VSpline::GetEndAngle(), VSpline::GetEndAngleFormula(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VSpline::GetP1(), VSpline::GetP4(), VAbstractCurve::GetPenStyle(), GetSpline(), VSpline::GetStartAngle(), VSpline::GetStartAngleFormula(), VGObject::name(), VSpline::Rotate(), and splPath.
| void VSplinePath::Swap | ( | VSplinePath & | path | ) |
Definition at line 65 of file vsplinepath.cpp.
References VAbstractCurve::Swap().
| void VSplinePath::UpdatePoint | ( | qint32 | indexSpline, |
| const SplinePointPosition & | pos, | ||
| const VSplinePoint & | point | ||
| ) |
UpdatePoint update spline point in list.
| indexSpline | spline index in list. |
| pos | position point in spline. |
| point | point. |
Definition at line 277 of file vsplinepath.cpp.
References CountSubSpl(), d, and FirstPoint.
|
private |
Definition at line 123 of file vsplinepath.h.
Referenced by append(), at(), Clear(), CountPoints(), CountSubSpl(), FirstPoint(), GetFSplinePath(), GetSpline(), GetSplinePath(), GetSplinePoint(), LastPoint(), operator=(), operator[](), UpdatePoint(), and VSplinePath().