42 QgsVector operator*(
double scalar )
const;
43 QgsVector operator/(
double scalar )
const;
45 double length()
const;
54 double angle(
void )
const;
88 : m_x( point.x() ), m_y( point.y() )
96 : m_x( point.x() ), m_y( point.y() )
119 void set(
double x,
double y )
151 QString toString(
int thePrecision )
const;
162 QString toDegreesMinutesSeconds(
int thePrecision,
const bool useSuffix =
true,
const bool padded =
false )
const;
173 QString toDegreesMinutes(
int thePrecision,
const bool useSuffix =
true,
const bool padded =
false )
const;
183 double sqrDist(
double x,
double y )
const;
186 double sqrDist(
const QgsPoint& other )
const;
192 double azimuth(
const QgsPoint& other );
200 bool compare(
const QgsPoint &other,
double epsilon = 4 * DBL_EPSILON )
const;
209 void multiply(
double scalar );
257 uint h1 =
qHash( static_cast< quint64 >( p.m_x ) );
258 uint h2 =
qHash( static_cast< quint64 >( p.m_y ) );
259 hash = h1 ^( h2 << 1 );
QgsPoint operator+(QgsVector v) const
QgsPoint operator-(QgsVector v) const
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsVector operator-(const QgsPoint &p) const
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
double x() const
Get the x value of the point.
QgsPoint()
Default constructor.
QgsPoint(QPointF point)
Create a point from a QPointF.
QgsPoint & operator-=(QgsVector v)
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
QString toString() const
String representation of the point (x,y)
A class to represent a point.
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
QByteArray toLocal8Bit() const
A class to represent a vector.
void setX(double x)
Sets the x value of the point.
void setY(double y)
Sets the y value of the point.
std::ostream & operator<<(std::ostream &os, const QgsPoint &p)
QgsPoint(QPoint point)
Create a point from a QPoint.
QgsPoint(double x, double y)
Create a point from x,y coordinates.
double y() const
Get the y value of the point.
QgsPoint & operator+=(QgsVector v)
uint qHash(const QgsPoint &p)
bool operator==(const QgsPoint &p1, const QgsPoint &p2)