#include <vcubicbezier.h>
Public Member Functions | |
VCubicBezier () | |
VCubicBezier (const VCubicBezier &curve) | |
VCubicBezier (const VPointF &p1, const VPointF &p2, const VPointF &p3, const VPointF &p4, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VCubicBezier | Rotate (const QPointF &originPoint, qreal degrees, const QString &prefix=QString()) const |
VCubicBezier | Flip (const QLineF &axis, const QString &prefix=QString()) const |
VCubicBezier | Move (qreal length, qreal angle, const QString &prefix=QString()) const |
virtual | ~VCubicBezier () |
VCubicBezier & | operator= (const VCubicBezier &curve) |
void | Swap (VCubicBezier &curve) Q_DECL_NOTHROW |
virtual VPointF | GetP1 () const Q_DECL_OVERRIDE |
void | SetP1 (const VPointF &p) |
virtual VPointF | GetP2 () const Q_DECL_OVERRIDE |
void | SetP2 (const VPointF &p) |
virtual VPointF | GetP3 () const Q_DECL_OVERRIDE |
void | SetP3 (const VPointF &p) |
virtual VPointF | GetP4 () const Q_DECL_OVERRIDE |
void | SetP4 (const VPointF &p) |
virtual qreal | GetStartAngle () const Q_DECL_OVERRIDE |
virtual qreal | GetEndAngle () const Q_DECL_OVERRIDE |
virtual qreal | GetLength () const Q_DECL_OVERRIDE |
GetLength return length of cubic bezier curve. More... | |
virtual QVector< QPointF > | getPoints () const Q_DECL_OVERRIDE |
GetPoints return list with cubic bezier curve points. More... | |
virtual qreal | GetC1Length () const Q_DECL_OVERRIDE |
virtual qreal | GetC2Length () const Q_DECL_OVERRIDE |
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 |
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 Attributes | |
QSharedDataPointer< VCubicBezierData > | 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 |
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) |
Definition at line 69 of file vcubicbezier.h.
VCubicBezier::VCubicBezier | ( | ) |
Definition at line 67 of file vcubicbezier.cpp.
References CubicBezier.
VCubicBezier::VCubicBezier | ( | const VCubicBezier & | curve | ) |
Definition at line 73 of file vcubicbezier.cpp.
VCubicBezier::VCubicBezier | ( | const VPointF & | p1, |
const VPointF & | p2, | ||
const VPointF & | p3, | ||
const VPointF & | p4, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
Definition at line 79 of file vcubicbezier.cpp.
References VAbstractCubicBezier::CreateName(), and CubicBezier.
|
virtual |
Definition at line 144 of file vcubicbezier.cpp.
VCubicBezier VCubicBezier::Flip | ( | const QLineF & | axis, |
const QString & | prefix = QString() |
||
) | const |
Definition at line 114 of file vcubicbezier.cpp.
References VPointF::Flip(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VGObject::name(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
|
virtual |
Implements VAbstractBezier.
Definition at line 231 of file vcubicbezier.cpp.
|
virtual |
Implements VAbstractBezier.
Definition at line 237 of file vcubicbezier.cpp.
|
protectedvirtual |
Implements VAbstractCubicBezier.
Definition at line 243 of file vcubicbezier.cpp.
References GetP2().
|
protectedvirtual |
Implements VAbstractCubicBezier.
Definition at line 249 of file vcubicbezier.cpp.
References GetP3().
|
virtual |
Implements VAbstractCurve.
Definition at line 203 of file vcubicbezier.cpp.
|
virtual |
GetLength return length of cubic bezier curve.
Implements VAbstractCurve.
Definition at line 213 of file vcubicbezier.cpp.
References GetP1(), GetP2(), GetP3(), GetP4(), and VAbstractCubicBezier::LengthBezier().
|
virtual |
Implements VAbstractCubicBezier.
Definition at line 149 of file vcubicbezier.cpp.
References d.
Referenced by VToolCubicBezier::Create(), VToolCubicBezier::FirstPointName(), Flip(), GetC1Length(), GetLength(), getPoints(), GetStartAngle(), Move(), DialogCubicBezier::PointNameChanged(), Rotate(), DialogCubicBezier::SetSpline(), and VToolCubicBezier::SetSplineAttributes().
|
virtual |
Implements VAbstractCubicBezier.
Definition at line 161 of file vcubicbezier.cpp.
References d.
Referenced by Flip(), GetC1Length(), GetControlPoint1(), GetLength(), getPoints(), GetStartAngle(), Move(), Rotate(), VToolCubicBezier::SecondPointName(), DialogCubicBezier::SetSpline(), and VToolCubicBezier::SetSplineAttributes().
|
virtual |
Implements VAbstractCubicBezier.
Definition at line 173 of file vcubicbezier.cpp.
References d.
Referenced by Flip(), GetC2Length(), GetControlPoint2(), GetEndAngle(), GetLength(), getPoints(), Move(), Rotate(), DialogCubicBezier::SetSpline(), VToolCubicBezier::SetSplineAttributes(), and VToolCubicBezier::ThirdPointName().
|
virtual |
Implements VAbstractCubicBezier.
Definition at line 185 of file vcubicbezier.cpp.
References d.
Referenced by VToolCubicBezier::Create(), Flip(), VToolCubicBezier::ForthPointName(), GetC2Length(), GetEndAngle(), GetLength(), getPoints(), Move(), DialogCubicBezier::PointNameChanged(), Rotate(), DialogCubicBezier::SetSpline(), and VToolCubicBezier::SetSplineAttributes().
|
virtual |
GetPoints return list with cubic bezier curve points.
Implements VAbstractCurve.
Definition at line 224 of file vcubicbezier.cpp.
References VAbstractCubicBezier::GetCubicBezierPoints(), GetP1(), GetP2(), GetP3(), and GetP4().
|
virtual |
Implements VAbstractCurve.
Definition at line 197 of file vcubicbezier.cpp.
VCubicBezier VCubicBezier::Move | ( | qreal | length, |
qreal | angle, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 129 of file vcubicbezier.cpp.
References VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VPointF::Move(), VGObject::name(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
VCubicBezier & VCubicBezier::operator= | ( | const VCubicBezier & | curve | ) |
Definition at line 87 of file vcubicbezier.cpp.
References d, and VAbstractCubicBezier::operator=().
VCubicBezier VCubicBezier::Rotate | ( | const QPointF & | originPoint, |
qreal | degrees, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 99 of file vcubicbezier.cpp.
References VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), GetP1(), GetP2(), GetP3(), GetP4(), VAbstractCurve::GetPenStyle(), VGObject::name(), VPointF::Rotate(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), and VAbstractCurve::SetPenStyle().
void VCubicBezier::SetP1 | ( | const VPointF & | p | ) |
Definition at line 155 of file vcubicbezier.cpp.
References d.
void VCubicBezier::SetP2 | ( | const VPointF & | p | ) |
Definition at line 167 of file vcubicbezier.cpp.
References d.
void VCubicBezier::SetP3 | ( | const VPointF & | p | ) |
Definition at line 179 of file vcubicbezier.cpp.
References d.
void VCubicBezier::SetP4 | ( | const VPointF & | p | ) |
Definition at line 191 of file vcubicbezier.cpp.
References d.
void VCubicBezier::Swap | ( | VCubicBezier & | curve | ) |
Definition at line 63 of file vcubicbezier.cpp.
References VAbstractCurve::Swap().
|
private |