Quantum GIS API Documentation
1.7.4
|
A class to represent a vector. More...
#include <qgspoint.h>
Public Member Functions | |
QgsVector () | |
QgsVector (double x, double y) | |
QgsVector | operator- (void) const |
QgsVector | operator* (double scalar) const |
QgsVector | operator/ (double scalar) const |
double | operator* (QgsVector v) const |
double | length () const |
double | x () const |
double | y () const |
QgsVector | perpVector () const |
double | angle (void) const |
double | angle (QgsVector v) const |
QgsVector | rotateBy (double rot) const |
QgsVector | normal () const |
Private Attributes | |
double | m_x |
double | m_y |
A class to represent a vector.
Currently no Z axis / 2.5D support is implemented.
Definition at line 31 of file qgspoint.h.
Definition at line 32 of file qgspoint.cpp.
Referenced by operator*(), operator-(), perpVector(), and rotateBy().
QgsVector::QgsVector | ( | double | x, |
double | y | ||
) |
Definition at line 36 of file qgspoint.cpp.
double QgsVector::angle | ( | void | ) | const |
double QgsVector::angle | ( | QgsVector | v | ) | const |
Definition at line 87 of file qgspoint.cpp.
References angle().
double QgsVector::length | ( | ) | const |
Definition at line 60 of file qgspoint.cpp.
Referenced by QgsGeometry::checkRingIntersections(), distLine2Point(), normal(), rotateBy(), and QgsGeometry::validatePolyline().
QgsVector QgsVector::normal | ( | ) | const |
Definition at line 99 of file qgspoint.cpp.
References length().
QgsVector QgsVector::operator* | ( | double | scalar | ) | const |
Definition at line 45 of file qgspoint.cpp.
References m_x, m_y, and QgsVector().
double QgsVector::operator* | ( | QgsVector | v | ) | const |
Definition at line 55 of file qgspoint.cpp.
QgsVector QgsVector::operator- | ( | void | ) | const |
Definition at line 40 of file qgspoint.cpp.
References m_x, m_y, and QgsVector().
QgsVector QgsVector::operator/ | ( | double | scalar | ) | const |
Definition at line 50 of file qgspoint.cpp.
QgsVector QgsVector::perpVector | ( | ) | const |
Definition at line 76 of file qgspoint.cpp.
References m_x, m_y, and QgsVector().
Referenced by QgsGeometry::checkRingIntersections(), and QgsGeometry::validatePolyline().
QgsVector QgsVector::rotateBy | ( | double | rot | ) | const |
Definition at line 92 of file qgspoint.cpp.
References length(), m_x, m_y, and QgsVector().
double QgsVector::x | ( | ) | const |
Definition at line 65 of file qgspoint.cpp.
References m_x.
Referenced by distLine2Point(), intersectLines(), QgsPoint::operator+(), and QgsPoint::operator-().
double QgsVector::y | ( | ) | const |
Definition at line 70 of file qgspoint.cpp.
References m_y.
Referenced by distLine2Point(), intersectLines(), QgsPoint::operator+(), and QgsPoint::operator-().
double QgsVector::m_x [private] |
Definition at line 33 of file qgspoint.h.
Referenced by angle(), length(), operator*(), operator-(), perpVector(), rotateBy(), and x().
double QgsVector::m_y [private] |
Definition at line 33 of file qgspoint.h.
Referenced by angle(), length(), operator*(), operator-(), perpVector(), rotateBy(), and y().