QgsVector Class Reference
[QGIS core library]

A class to represent a vector. More...

#include <qgspoint.h>

List of all members.

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


Detailed Description

A class to represent a vector.

Currently no Z axis / 2.5D support is implemented.

Definition at line 30 of file qgspoint.h.


Constructor & Destructor Documentation

QgsVector::QgsVector (  ) 

Definition at line 31 of file qgspoint.cpp.

Referenced by operator*(), operator-(), perpVector(), and rotateBy().

QgsVector::QgsVector ( double  x,
double  y 
)

Definition at line 35 of file qgspoint.cpp.


Member Function Documentation

QgsVector QgsVector::operator- ( void   )  const

Definition at line 39 of file qgspoint.cpp.

References m_x, m_y, and QgsVector().

QgsVector QgsVector::operator* ( double  scalar  )  const

Definition at line 44 of file qgspoint.cpp.

References m_x, m_y, and QgsVector().

QgsVector QgsVector::operator/ ( double  scalar  )  const

Definition at line 49 of file qgspoint.cpp.

double QgsVector::operator* ( QgsVector  v  )  const

Definition at line 54 of file qgspoint.cpp.

References m_x, and m_y.

double QgsVector::length (  )  const

double QgsVector::x (  )  const

Definition at line 64 of file qgspoint.cpp.

References m_x.

Referenced by distLine2Point(), intersectLines(), QgsPoint::operator+(), and QgsPoint::operator-().

double QgsVector::y (  )  const

Definition at line 69 of file qgspoint.cpp.

References m_y.

Referenced by distLine2Point(), intersectLines(), QgsPoint::operator+(), and QgsPoint::operator-().

QgsVector QgsVector::perpVector (  )  const

Definition at line 75 of file qgspoint.cpp.

References m_x, m_y, and QgsVector().

Referenced by QgsGeometry::checkRingIntersections(), and QgsGeometry::validatePolyline().

double QgsVector::angle ( void   )  const

Definition at line 80 of file qgspoint.cpp.

References M_PI, m_x, and m_y.

Referenced by angle().

double QgsVector::angle ( QgsVector  v  )  const

Definition at line 86 of file qgspoint.cpp.

References angle().

QgsVector QgsVector::rotateBy ( double  rot  )  const

Definition at line 91 of file qgspoint.cpp.

References length(), m_x, m_y, and QgsVector().

QgsVector QgsVector::normal (  )  const

Definition at line 98 of file qgspoint.cpp.

References length().


Member Data Documentation

double QgsVector::m_x [private]

Definition at line 32 of file qgspoint.h.

Referenced by angle(), length(), operator*(), operator-(), perpVector(), rotateBy(), and x().

double QgsVector::m_y [private]

Definition at line 32 of file qgspoint.h.

Referenced by angle(), length(), operator*(), operator-(), perpVector(), rotateBy(), and y().


The documentation for this class was generated from the following files:

Generated on Sat Feb 4 19:17:56 2012 for Quantum GIS API Documentation by  doxygen 1.5.6