VSpline class that implements the spline. More...
#include <vspline.h>
Public Member Functions | |
VSpline () | |
VSpline default constructor. More... | |
VSpline (const VSpline &spline) | |
VSpline constructor. More... | |
VSpline (const VPointF &p1, const VPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VSpline constructor. More... | |
VSpline (const VPointF &p1, const QPointF &p2, const QPointF &p3, const VPointF &p4, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VSpline constructor. More... | |
VSpline (const VPointF &p1, const VPointF &p4, qreal angle1, const QString &angle1Formula, qreal angle2, const QString &angle2Formula, qreal c1Length, const QString &c1LengthFormula, qreal c2Length, const QString &c2LengthFormula, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VSpline constructor. More... | |
VSpline | Rotate (const QPointF &originPoint, qreal degrees, const QString &prefix=QString()) const |
VSpline | Flip (const QLineF &axis, const QString &prefix=QString()) const |
VSpline | Move (qreal length, qreal angle, const QString &prefix=QString()) const |
virtual | ~VSpline () |
VSpline & | operator= (const VSpline &spline) |
void | Swap (VSpline &spline) Q_DECL_NOTHROW |
virtual VPointF | GetP1 () const Q_DECL_OVERRIDE |
GetP1 return first spline point. More... | |
void | SetP1 (const VPointF &p) |
virtual VPointF | GetP2 () const Q_DECL_OVERRIDE |
GetP2 return first control point. More... | |
virtual VPointF | GetP3 () const Q_DECL_OVERRIDE |
GetP3 return second control point. More... | |
virtual VPointF | GetP4 () const Q_DECL_OVERRIDE |
GetP4 return last spline point. More... | |
void | SetP4 (const VPointF &p) |
virtual qreal | GetStartAngle () const Q_DECL_OVERRIDE |
GetAngle1 return first angle control line. More... | |
virtual qreal | GetEndAngle () const Q_DECL_OVERRIDE |
GetAngle2 return second angle control line. More... | |
QString | GetStartAngleFormula () const |
QString | GetEndAngleFormula () const |
void | SetStartAngle (qreal angle, const QString &formula) |
void | SetEndAngle (qreal angle, const QString &formula) |
virtual qreal | GetC1Length () const Q_DECL_OVERRIDE |
virtual qreal | GetC2Length () const Q_DECL_OVERRIDE |
QString | GetC1LengthFormula () const |
QString | GetC2LengthFormula () const |
void | SetC1Length (qreal length, const QString &formula) |
void | SetC2Length (qreal length, const QString &formula) |
virtual qreal | GetLength () const Q_DECL_OVERRIDE |
GetLength return length of spline. More... | |
qreal | GetKasm1 () const |
GetKasm1 return coefficient of length first control line. More... | |
qreal | GetKasm2 () const |
GetKasm2 return coefficient of length second control line. More... | |
qreal | GetKcurve () const |
GetKcurve return coefficient of curvature spline. More... | |
QPointF | CutSpline (qreal length, VSpline &spl1, VSpline &spl2) const |
virtual QVector< QPointF > | getPoints () const Q_DECL_OVERRIDE |
GetPoints return list with spline points. More... | |
qreal | ParamT (const QPointF &pBt) const |
VSpline::ParamT calculate t coeffient that reprezent point on curve. More... | |
QPointF | CutSpline (qreal length, QPointF &spl1p2, QPointF &spl1p3, QPointF &spl2p2, QPointF &spl2p3) const |
CutSpline cut spline. More... | |
Public Member Functions inherited from VAbstractCubicBezier | |
VAbstractCubicBezier (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
VAbstractCubicBezier (const VAbstractCubicBezier &curve) | |
VAbstractCubicBezier & | operator= (const VAbstractCubicBezier &curve) |
virtual | ~VAbstractCubicBezier () |
QPointF | CutSpline (qreal length, QPointF &spl1p2, QPointF &spl1p3, QPointF &spl2p2, QPointF &spl2p3) const |
CutSpline cut spline. More... | |
virtual QString | NameForHistory (const QString &toolName) const Q_DECL_OVERRIDE |
qreal | GetParmT (qreal length) const |
qreal | LengthT (qreal t) const |
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 |
virtual QPainterPath | GetPath () 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 () |
virtual QVector< DirectionArrow > | DirectionArrows () const |
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 |
Static Public Member Functions | |
static QVector< QPointF > | SplinePoints (const QPointF &p1, const QPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve) |
SplinePoints return list with spline points. More... | |
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... | |
Protected Member Functions | |
virtual QPointF | GetControlPoint1 () const Q_DECL_OVERRIDE |
virtual QPointF | GetControlPoint2 () const Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractCubicBezier | |
virtual void | CreateName () Q_DECL_OVERRIDE |
Private Member Functions | |
QVector< qreal > | CalcT (qreal curveCoord1, qreal curveCoord2, qreal curveCoord3, qreal curveCoord4, qreal pointCoord) const |
Static Private Member Functions | |
static qint32 | Cubic (QVector< qreal > &x, qreal a, qreal b, qreal c) |
Cubic Cubic equation solution. Real coefficients case. More... | |
static int | Sign (long double ld) |
Private Attributes | |
QSharedDataPointer< VSplineData > | d |
Additional Inherited Members | |
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 |
Static Protected Member Functions inherited from VAbstractCubicBezier | |
static qreal | CalcSqDistance (qreal x1, qreal y1, qreal x2, qreal y2) |
CalcSqDistance calculate squared distance. More... | |
static void | PointBezier_r (qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4, qint16 level, QVector< qreal > &px, QVector< qreal > &py) |
PointBezier_r find spline point using four point of spline. More... | |
static QVector< QPointF > | GetCubicBezierPoints (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4) |
GetCubicBezierPoints return list with cubic bezier curve points. More... | |
static qreal | LengthBezier (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4) |
LengthBezier return spline length using 4 spline point. More... | |
Static Protected Member Functions inherited from VGObject | |
static QTransform | flipTransform (const QLineF &axis) |
VSpline::VSpline | ( | ) |
VSpline default constructor.
Definition at line 71 of file vspline.cpp.
References Spline.
Referenced by CutSpline().
VSpline::VSpline | ( | const VSpline & | spline | ) |
VSpline constructor.
spline | spline from which the copy. |
Definition at line 80 of file vspline.cpp.
VSpline::VSpline | ( | const VPointF & | p1, |
const VPointF & | p4, | ||
qreal | angle1, | ||
qreal | angle2, | ||
qreal | kAsm1, | ||
qreal | kAsm2, | ||
qreal | kCurve, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
VSpline constructor.
p1 | first point spline. |
p4 | last point spline. |
angle1 | angle from first point to first control point. |
angle2 | angle from second point to second control point. |
kCurve | coefficient of curvature spline. |
kAsm1 | coefficient of length first control line. |
kAsm2 | coefficient of length second control line. |
Definition at line 95 of file vspline.cpp.
References VAbstractCubicBezier::CreateName(), and Spline.
VSpline::VSpline | ( | const VPointF & | p1, |
const QPointF & | p2, | ||
const QPointF & | p3, | ||
const VPointF & | p4, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
VSpline constructor.
p1 | first point spline. |
p2 | first control point. |
p3 | second control point. |
p4 | second point spline. |
Definition at line 111 of file vspline.cpp.
References VAbstractCubicBezier::CreateName(), and Spline.
VSpline::VSpline | ( | const VPointF & | p1, |
const VPointF & | p4, | ||
qreal | angle1, | ||
const QString & | angle1Formula, | ||
qreal | angle2, | ||
const QString & | angle2Formula, | ||
qreal | c1Length, | ||
const QString & | c1LengthFormula, | ||
qreal | c2Length, | ||
const QString & | c2LengthFormula, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
VSpline constructor.
p1 | first point spline. |
p4 | first control point. |
angle1 | angle from first point to first control point. |
angle1Formula | formula angle from first point to first control point. |
angle2 | angle from second point to second control point. |
angle2Formula | formula angle from second point to second control point. |
c1Length | length from first point to first control point. |
c1LengthFormula | formula length from first point to first control point. |
c2Length | length from second point to first control point. |
c2LengthFormula | formula length from second point to first control point. |
Definition at line 133 of file vspline.cpp.
References VAbstractCubicBezier::CreateName(), and Spline.
|
virtual |
Definition at line 195 of file vspline.cpp.
|
private |
|
staticprivate |
Cubic Cubic equation solution. Real coefficients case.
This method use method Vieta-Cardano for eval cubic equations. Cubic equation write in form x3+a*x2+b*x+c=0.
Output: 3 real roots -> then x is filled with them; 1 real + 2 complex -> x[0] is real, x[1] is real part of complex roots, x[2] - non-negative imaginary part.
x | solution array (size 3). |
a | coefficient |
b | coefficient |
c | coefficient |
Definition at line 477 of file vspline.cpp.
Referenced by CalcT().
QPointF VAbstractCubicBezier::CutSpline |
CutSpline cut spline.
length | length first spline |
spl1p2 | second point of first spline |
spl1p3 | third point of first spline |
spl2p2 | second point of second spline |
spl2p3 | third point of second spline |
Definition at line 80 of file vabstractcubicbezier.cpp.
Referenced by CutSpline().
Definition at line 210 of file vspline.cpp.
References CutSpline(), GetP1(), GetP4(), and VSpline().
Referenced by VAbstractCubicBezierPath::CutSplinePath().
VSpline VSpline::Flip | ( | const QLineF & | axis, |
const QString & | prefix = QString() |
||
) | const |
Definition at line 161 of file vspline.cpp.
References VPointF::Flip(), VPointF::FlipPF(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VGObject::name(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
Referenced by VSplinePath::Flip().
|
virtual |
Implements VAbstractBezier.
Definition at line 379 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), VSplinePath::Flip(), VCubicBezierPath::GetC1Length(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VCurveCLength::VCurveCLength(), and VSplinePath::VSplinePath().
QString VSpline::GetC1LengthFormula | ( | ) | const |
Definition at line 391 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), MoveSpline::Do(), VSplinePath::Flip(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), DialogSpline::ShowDialog(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), VSplinePath::VSplinePath(), and VToolSplinePath::VToolSplinePath().
|
virtual |
Implements VAbstractBezier.
Definition at line 385 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), VSplinePath::Flip(), VCubicBezierPath::GetC2Length(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VCurveCLength::VCurveCLength(), and VSplinePath::VSplinePath().
QString VSpline::GetC2LengthFormula | ( | ) | const |
Definition at line 397 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), MoveSpline::Do(), VSplinePath::Flip(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), DialogSpline::ShowDialog(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), VSplinePath::VSplinePath(), and VToolSplinePath::VToolSplinePath().
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
GetAngle2 return second angle control line.
Implements VAbstractCurve.
Definition at line 347 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VToolCutSplinePath::CutSplinePath(), VSplinePath::Flip(), VCubicBezierPath::GetEndAngle(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), DialogSpline::PointNameChanged(), VSplinePath::Rotate(), DialogSpline::SaveData(), DialogSpline::SetSpline(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), and VCurveAngle::VCurveAngle().
QString VSpline::GetEndAngleFormula | ( | ) | const |
Definition at line 359 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VToolCutSplinePath::CutSplinePath(), MoveSpline::Do(), VSplinePath::Flip(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), DialogSpline::ShowDialog(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), VSplinePath::VSplinePath(), and VToolSplinePath::VToolSplinePath().
qreal VSpline::GetKasm1 | ( | ) | const |
GetKasm1 return coefficient of length first control line.
Definition at line 421 of file vspline.cpp.
References d, VSplineData::GetL(), and GetP2().
Referenced by VSplinePath::GetFSplinePath(), DialogSpline::PointNameChanged(), DialogSpline::SaveData(), and DialogSpline::SetSpline().
qreal VSpline::GetKasm2 | ( | ) | const |
GetKasm2 return coefficient of length second control line.
Definition at line 432 of file vspline.cpp.
References d, VSplineData::GetL(), and GetP3().
Referenced by VSplinePath::GetFSplinePath(), DialogSpline::PointNameChanged(), DialogSpline::SaveData(), and DialogSpline::SetSpline().
qreal VSpline::GetKcurve | ( | ) | const |
GetKcurve return coefficient of curvature spline.
Definition at line 443 of file vspline.cpp.
References d.
Referenced by DialogSpline::PointNameChanged(), DialogSpline::SaveData(), and DialogSpline::SetSpline().
|
virtual |
GetLength return length of spline.
Implements VAbstractCurve.
Definition at line 203 of file vspline.cpp.
References GetP1(), GetP2(), GetP3(), GetP4(), and VAbstractCubicBezier::LengthBezier().
Referenced by VAbstractCubicBezierPath::CutSplinePath(), VAbstractCubicBezierPath::GetLength(), VToolCutSpline::makeToolTip(), and VCurveLength::VCurveLength().
|
virtual |
GetP1 return first spline point.
Implements VAbstractCubicBezier.
Definition at line 281 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VToolSpline::Create(), VisToolSplinePath::Creating(), CutSpline(), MoveSpline::Do(), Flip(), VSplinePath::Flip(), GetLength(), getPoints(), VCubicBezierPath::GetSplinePath(), VToolSplinePath::mouseMoveEvent(), Move(), VSplinePath::Move(), ParamT(), DialogSpline::PointNameChanged(), VisToolCubicBezierPath::RefreshGeometry(), VisToolSplinePath::RefreshGeometry(), Rotate(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), and VToolSplinePath::VToolSplinePath().
|
virtual |
GetP2 return first control point.
Implements VAbstractCubicBezier.
Definition at line 297 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VisToolSplinePath::Creating(), Flip(), GetControlPoint1(), GetKasm1(), GetLength(), getPoints(), VToolSplinePath::mouseMoveEvent(), Move(), ParamT(), VisToolCubicBezierPath::RefreshGeometry(), VisToolSplinePath::RefreshGeometry(), Rotate(), VToolSpline::SaveDialog(), VToolSplinePath::SaveDialog(), QT_WARNING_POP::UpdateNodeSplinePath(), and VToolSplinePath::VToolSplinePath().
|
virtual |
GetP3 return second control point.
Implements VAbstractCubicBezier.
Definition at line 309 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), Flip(), GetControlPoint2(), GetKasm2(), GetLength(), getPoints(), VToolSplinePath::mouseMoveEvent(), Move(), ParamT(), VisToolCubicBezierPath::RefreshGeometry(), VisToolSplinePath::RefreshGeometry(), Rotate(), VToolSpline::SaveDialog(), VToolSplinePath::SaveDialog(), QT_WARNING_POP::UpdateNodeSplinePath(), and VToolSplinePath::VToolSplinePath().
|
virtual |
GetP4 return last spline point.
Implements VAbstractCubicBezier.
Definition at line 321 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VToolSpline::Create(), CutSpline(), MoveSpline::Do(), Flip(), VSplinePath::Flip(), GetLength(), getPoints(), VCubicBezierPath::GetSplinePath(), VToolSplinePath::mouseMoveEvent(), Move(), VSplinePath::Move(), ParamT(), DialogSpline::PointNameChanged(), VisToolCubicBezierPath::RefreshGeometry(), VisToolSplinePath::RefreshGeometry(), Rotate(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), and VToolSplinePath::VToolSplinePath().
|
virtual |
GetPoints return list with spline points.
Implements VAbstractCurve.
Definition at line 228 of file vspline.cpp.
References VAbstractCubicBezier::GetCubicBezierPoints(), GetP1(), GetP2(), GetP3(), and GetP4().
Referenced by VAbstractCubicBezierPath::getPoints(), and VArc::getPoints().
|
virtual |
GetAngle1 return first angle control line.
Implements VAbstractCurve.
Definition at line 337 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), VSplinePath::Flip(), VCubicBezierPath::GetSplinePath(), VCubicBezierPath::GetStartAngle(), VSplinePath::Move(), DialogSpline::PointNameChanged(), VSplinePath::Rotate(), DialogSpline::SaveData(), DialogSpline::SetSpline(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), and VCurveAngle::VCurveAngle().
QString VSpline::GetStartAngleFormula | ( | ) | const |
Definition at line 353 of file vspline.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeSplinePath(), VAbstractSpline::CorrectedSpline(), VisToolSplinePath::Creating(), VToolCutSplinePath::CutSplinePath(), MoveSpline::Do(), VSplinePath::Flip(), VCubicBezierPath::GetSplinePath(), VSplinePath::Move(), VSplinePath::Rotate(), DialogSpline::SetSpline(), VToolSpline::SetSplineAttributes(), DialogSpline::ShowDialog(), VToolSplinePath::UpdateControlPoints(), QT_WARNING_POP::UpdateNodeSplinePath(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), VSplinePath::VSplinePath(), and VToolSplinePath::VToolSplinePath().
VSpline VSpline::Move | ( | qreal | length, |
qreal | angle, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 178 of file vspline.cpp.
References VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VPointF::Move(), VPointF::MovePF(), VGObject::name(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
Referenced by VSplinePath::Move().
Definition at line 265 of file vspline.cpp.
References d, and VAbstractCubicBezier::operator=().
qreal VSpline::ParamT | ( | const QPointF & | pBt | ) | const |
VSpline::ParamT calculate t coeffient that reprezent point on curve.
Each point that belongs to Cubic Bézier curve can be shown by coefficient in interval [0; 1].
pBt | point on curve |
Definition at line 540 of file vspline.cpp.
References CalcT(), GetP1(), GetP2(), GetP3(), GetP4(), VPointF::x(), and VPointF::y().
Referenced by VToolSpline::mouseMoveEvent(), VToolSplinePath::mouseMoveEvent(), and VAbstractCubicBezierPath::Segment().
VSpline VSpline::Rotate | ( | const QPointF & | originPoint, |
qreal | degrees, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 144 of file vspline.cpp.
References VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VGObject::name(), VPointF::Rotate(), VPointF::RotatePF(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
Referenced by VSplinePath::Rotate().
void VSpline::SetC1Length | ( | qreal | length, |
const QString & | formula | ||
) |
Definition at line 403 of file vspline.cpp.
References d.
void VSpline::SetC2Length | ( | qreal | length, |
const QString & | formula | ||
) |
Definition at line 410 of file vspline.cpp.
References d.
void VSpline::SetEndAngle | ( | qreal | angle, |
const QString & | formula | ||
) |
Definition at line 372 of file vspline.cpp.
References d.
void VSpline::SetP1 | ( | const VPointF & | p | ) |
Definition at line 287 of file vspline.cpp.
References d.
void VSpline::SetP4 | ( | const VPointF & | p | ) |
Definition at line 327 of file vspline.cpp.
References d.
void VSpline::SetStartAngle | ( | qreal | angle, |
const QString & | formula | ||
) |
Definition at line 365 of file vspline.cpp.
References d.
|
staticprivate |
Definition at line 449 of file vspline.cpp.
Referenced by Cubic().
|
static |
SplinePoints return list with spline points.
p1 | first spline point. |
p4 | last spline point. |
angle1 | angle from first point to first control point. |
angle2 | angle from second point to second control point. |
kAsm1 | coefficient of length first control line. |
kAsm2 | coefficient of length second control line. |
kCurve | coefficient of curvature spline. |
Definition at line 247 of file vspline.cpp.
References VAbstractCubicBezier::GetCubicBezierPoints().
void VSpline::Swap | ( | VSpline & | spline | ) |
Definition at line 64 of file vspline.cpp.
References VAbstractCurve::Swap().
|
private |
Definition at line 143 of file vspline.h.
Referenced by CalcT(), GetC1Length(), GetC1LengthFormula(), GetC2Length(), GetC2LengthFormula(), GetEndAngle(), GetEndAngleFormula(), GetKasm1(), GetKasm2(), GetKcurve(), GetP1(), GetP2(), GetP3(), GetP4(), GetStartAngle(), GetStartAngleFormula(), operator=(), SetC1Length(), SetC2Length(), SetEndAngle(), SetP1(), SetP4(), and SetStartAngle().