53 QgsVector operator*(
double scalar )
const;
58 QgsVector operator/(
double scalar )
const;
67 double length()
const;
100 Q_DECL_DEPRECATED
QgsVector normal()
const;
176 void set(
double x,
double y )
208 QString toString(
int thePrecision )
const;
219 QString toDegreesMinutesSeconds(
int thePrecision,
const bool useSuffix =
true,
const bool padded =
false )
const;
230 QString toDegreesMinutes(
int thePrecision,
const bool useSuffix =
true,
const bool padded =
false )
const;
242 double sqrDist(
double x,
double y )
const;
247 double sqrDist(
const QgsPoint& other )
const;
255 double distance(
double x,
double y )
const;
262 double distance(
const QgsPoint& other )
const;
268 double azimuth(
const QgsPoint& other )
const;
276 QgsPoint project(
double distance,
double bearing )
const;
284 bool compare(
const QgsPoint &other,
double epsilon = 4 * DBL_EPSILON )
const;
293 void multiply(
double scalar );
362 uint h1 =
qHash( static_cast< quint64 >( p.m_x ) );
363 uint h2 =
qHash( static_cast< quint64 >( p.m_y ) );
364 hash = h1 ^( h2 << 1 );
QgsVector operator-(const QgsPoint &p) const
Calculates the vector obtained by subtracting a point from this point.
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
double y() const
Get the y value of the point.
QgsPoint()
Default constructor.
QgsPoint(QPointF point)
Create a point from a QPointF.
QgsPoint & operator-=(QgsVector v)
Subtracts a vector from this point in place.
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
QgsPoint operator/(double scalar) const
Divides the coordinates in this point by a scalar quantity.
QgsPoint operator+(QgsVector v) const
Adds a vector to this point.
QgsPoint & operator*=(double scalar)
Multiplies the coordinates in this point by a scalar quantity in place.
A class to represent a point.
QString toString() const
String representation of the point (x,y)
QgsPoint & operator/=(double scalar)
Divides the coordinates in this point by a scalar quantity in place.
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.
QgsInterval operator-(const QDateTime &dt1, const QDateTime &dt2)
Returns the interval between two datetimes.
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.
QgsPoint operator-(QgsVector v) const
Subtracts a vector from this point.
double x() const
Returns the vector's x-component.
double y() const
Returns the vector's y-component.
QgsPoint operator*(double scalar) const
Multiplies the coordinates in this point by a scalar quantity.
double x() const
Get the x value of the point.
QgsPoint & operator+=(QgsVector v)
Adds a vector to this point in place.
uint qHash(const QgsPoint &p)
bool operator==(const QgsPoint &p1, const QgsPoint &p2)