The VPointF class keep data of point. More...
#include <vpointf.h>
Public Member Functions | |
VPointF () | |
VPointF creat empty point. More... | |
VPointF (const VPointF &point) | |
VPointF (const QPointF &point) | |
VPointF (qreal x, qreal y, const QString &name, qreal mx, qreal my, quint32 idObject=0, const Draw &mode=Draw::Calculation) | |
VPointF create new point. More... | |
VPointF (const QPointF &point, const QString &name, qreal mx, qreal my, quint32 idObject=0, const Draw &mode=Draw::Calculation) | |
VPointF create new point. More... | |
virtual | ~VPointF () Q_DECL_OVERRIDE |
VPointF & | operator= (const VPointF &point) |
operator = assignment operator More... | |
void | Swap (VPointF &point) Q_DECL_NOTHROW |
operator QPointF () const | |
VPointF | Rotate (const QPointF &originPoint, qreal degrees, const QString &prefix=QString()) const |
VPointF | Flip (const QLineF &axis, const QString &prefix=QString()) const |
VPointF | Move (qreal length, qreal angle, const QString &prefix=QString()) const |
qreal | mx () const |
mx return offset name respect to x More... | |
qreal | my () const |
my return offset name respect to y More... | |
void | setMx (qreal mx) |
setMx set offset name respect to x More... | |
void | setMy (qreal my) |
setMy set offset name respect to y More... | |
QPointF | toQPointF () const |
qreal | x () const |
x return x coordinate More... | |
void | setX (const qreal &value) |
setX set x coordinate More... | |
qreal | y () const |
y return y coordinate More... | |
void | setY (const qreal &value) |
setY set y coordinate More... | |
bool | isShowPointName () const |
void | setShowPointName (bool show) |
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 QPointF | RotatePF (const QPointF &originPoint, const QPointF &point, qreal degrees) |
static QPointF | FlipPF (const QLineF &axis, const QPointF &point) |
static QPointF | MovePF (const QPointF &originPoint, qreal length, qreal angle) |
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... | |
Private Attributes | |
QSharedDataPointer< VPointFData > | d |
Additional Inherited Members | |
Static Public Attributes inherited from VGObject | |
static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Static Protected Member Functions inherited from VGObject | |
static QTransform | flipTransform (const QLineF &axis) |
VPointF::VPointF | ( | ) |
VPointF creat empty point.
Definition at line 70 of file vpointf.cpp.
References Calculation, and Point.
VPointF::VPointF | ( | const VPointF & | point | ) |
Definition at line 76 of file vpointf.cpp.
|
explicit |
Definition at line 82 of file vpointf.cpp.
VPointF::VPointF | ( | qreal | x, |
qreal | y, | ||
const QString & | name, | ||
qreal | mx, | ||
qreal | my, | ||
quint32 | idObject = 0 , |
||
const Draw & | mode = Draw::Calculation |
||
) |
VPointF create new point.
x | x coordinate |
y | y coordinate |
name | point label |
mx | offset name respect to x |
my | offset name respect to y |
Definition at line 96 of file vpointf.cpp.
References VGObject::name(), Point, and VGObject::setName().
VPointF::VPointF | ( | const QPointF & | point, |
const QString & | name, | ||
qreal | mx, | ||
qreal | my, | ||
quint32 | idObject = 0 , |
||
const Draw & | mode = Draw::Calculation |
||
) |
VPointF create new point.
point | point |
name | point label |
mx | offset name respect to x |
my | offset name respect to y |
Definition at line 111 of file vpointf.cpp.
References VGObject::name(), Point, and VGObject::setName().
|
virtual |
Definition at line 119 of file vpointf.cpp.
VPointF VPointF::Flip | ( | const QLineF & | axis, |
const QString & | prefix = QString() |
||
) | const |
Definition at line 155 of file vpointf.cpp.
References FlipPF(), isShowPointName(), mx(), my(), VGObject::name(), setShowPointName(), and toQPointF().
Referenced by VArc::Flip(), VCubicBezier::Flip(), and VSpline::Flip().
|
static |
Definition at line 279 of file vpointf.cpp.
References VGObject::flipTransform().
Referenced by VAbstractPiece::AngleByFirstSymmetry(), VAbstractPiece::AngleBySecondSymmetry(), VArc::Flip(), Flip(), and VSpline::Flip().
bool VPointF::isShowPointName | ( | ) | const |
Definition at line 259 of file vpointf.cpp.
References d.
Referenced by Flip(), Move(), VScenePoint::refreshPointGeometry(), Rotate(), and VToolDoublePoint::SaveOptions().
VPointF VPointF::Move | ( | qreal | length, |
qreal | angle, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 164 of file vpointf.cpp.
References isShowPointName(), MovePF(), mx(), my(), VGObject::name(), setShowPointName(), and toQPointF().
Referenced by VArc::Move(), VCubicBezier::Move(), VEllipticalArc::Move(), and VSpline::Move().
|
static |
Definition at line 286 of file vpointf.cpp.
Referenced by VArc::Move(), Move(), and VSpline::Move().
qreal VPointF::mx | ( | ) | const |
mx return offset name respect to x
Definition at line 177 of file vpointf.cpp.
References d.
Referenced by Flip(), Move(), VScenePoint::refreshPointGeometry(), Rotate(), VToolDoublePoint::SaveOptions(), and setMx().
qreal VPointF::my | ( | ) | const |
my return offset name respect to y
Definition at line 187 of file vpointf.cpp.
References d.
Referenced by Flip(), Move(), VScenePoint::refreshPointGeometry(), Rotate(), VToolDoublePoint::SaveOptions(), and setMy().
|
explicit |
Definition at line 140 of file vpointf.cpp.
operator = assignment operator
point | point |
Definition at line 128 of file vpointf.cpp.
References d, and VGObject::operator=().
VPointF VPointF::Rotate | ( | const QPointF & | originPoint, |
qreal | degrees, | ||
const QString & | prefix = QString() |
||
) | const |
Definition at line 146 of file vpointf.cpp.
References isShowPointName(), mx(), my(), VGObject::name(), RotatePF(), setShowPointName(), and toQPointF().
Referenced by VArc::Rotate(), VCubicBezier::Rotate(), and VSpline::Rotate().
|
static |
Definition at line 271 of file vpointf.cpp.
Referenced by VArc::Rotate(), Rotate(), and VSpline::Rotate().
void VPointF::setMx | ( | qreal | mx | ) |
setMx set offset name respect to x
mx | offset |
Definition at line 197 of file vpointf.cpp.
Referenced by VToolCutSplinePath::Create(), and VToolDoublePoint::setPointNamePosition().
void VPointF::setMy | ( | qreal | my | ) |
setMy set offset name respect to y
my | offset |
Definition at line 207 of file vpointf.cpp.
Referenced by VToolCutSplinePath::Create(), and VToolDoublePoint::setPointNamePosition().
void VPointF::setShowPointName | ( | bool | show | ) |
Definition at line 265 of file vpointf.cpp.
References d.
Referenced by PointIntersectXYTool::Create(), VToolCurveIntersectAxis::Create(), VToolLineIntersectAxis::Create(), VToolEndLine::Create(), VToolHeight::Create(), VToolAlongLine::Create(), VToolCutSpline::Create(), VToolCutArc::Create(), VToolCutSplinePath::Create(), VToolPointFromArcAndTangent::Create(), VToolTriangle::Create(), IntersectCircleTangentTool::Create(), IntersectCirclesTool::Create(), VToolPointOfIntersectionCurves::Create(), VToolLineIntersect::Create(), VToolNormal::Create(), VToolBisector::Create(), VToolShoulderPoint::Create(), VToolPointOfContact::Create(), VToolTrueDarts::Create(), Flip(), Move(), VPattern::ParseNodePoint(), VPattern::ParseToolBasePoint(), and Rotate().
void VPointF::setX | ( | const qreal & | value | ) |
setX set x coordinate
value | x coordinate |
Definition at line 233 of file vpointf.cpp.
References d.
Referenced by QT_WARNING_POP::BiasRotatePoint(), VEllipticalArc::GetCenter(), and QT_WARNING_POP::UnionInitParameters().
void VPointF::setY | ( | const qreal & | value | ) |
setY set y coordinate
value | y coordinate |
Definition at line 253 of file vpointf.cpp.
References d.
Referenced by QT_WARNING_POP::BiasRotatePoint(), VEllipticalArc::GetCenter(), and QT_WARNING_POP::UnionInitParameters().
void VPointF::Swap | ( | VPointF & | point | ) |
Definition at line 63 of file vpointf.cpp.
References VGObject::Swap().
QPointF VPointF::toQPointF | ( | ) | const |
Definition at line 213 of file vpointf.cpp.
References d.
Referenced by anonymous_namespace{vtoolmove.cpp}::findRotationOrigin(), Flip(), VEllipticalArc::GetCenter(), VEllipticalArc::getPoint(), VEllipticalArc::getPoints(), VEllipticalArc::Move(), Move(), Rotate(), and MainWindow::zoomToPoint().
qreal VPointF::x | ( | ) | const |
x return x coordinate
Definition at line 223 of file vpointf.cpp.
References d.
Referenced by QT_WARNING_POP::BiasRotatePoint(), VToolMove::Create(), VSpline::ParamT(), QT_WARNING_POP::UnionInitParameters(), and VSplineData::VSplineData().
qreal VPointF::y | ( | ) | const |
y return y coordinate
Definition at line 243 of file vpointf.cpp.
References d.
Referenced by QT_WARNING_POP::BiasRotatePoint(), VToolMove::Create(), VSpline::ParamT(), QT_WARNING_POP::UnionInitParameters(), and VSplineData::VSplineData().
|
private |
Definition at line 115 of file vpointf.h.
Referenced by isShowPointName(), mx(), my(), operator=(), setMx(), setMy(), setShowPointName(), setX(), setY(), toQPointF(), x(), and y().