Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

_QGAR_angle.TCC File Reference


Detailed Description

Implementation of global utilities for primitives.

Author:
Gérald Masini
Date:
February 03, 2005 18:28
Since:
Qgar 2.2

Definition in file _QGAR_angle.TCC.

Go to the source code of this file.

Namespaces

namespace  qgar

Global functions to compute angles between vectors

Warning:
 O
  +---------------> X
  |\    |
  | \ <-'
  |  \    angle (in radians unless specified)
  |   \
  |
  v

    Y
  • The origin of the coordinate system is at top left corner.
  • Angles are clockwise from the X axis.


template<class T>
double qgar::qgAngle (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Angle (in [0, 2PI[ radians) between the X axis and the vector formed by the two given points.
template<class T>
double qgar::qgAngleDegrees (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Same as qgar::qgAngle(const GenPoint<T>&, const GenPoint<T>&), but the result is given in [0, 360[ degrees.
template<class T>
double qgar::qgAngle (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2, const GenPoint< T > &aPt3)
 Angle (in [0, 2PI[ radians) between two vectors determined by 3 points.
template<class T>
double qgar::qgAngleDegrees (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2, const GenPoint< T > &aPt3)
 Same as qgar::qgAngle(const GenPoint<T>&,const GenPoint<T>&, const GenPoint<T>&), but the result is given in [0, 360[ degrees.
template<class T>
double qgar::qgAngle (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2, const GenPoint< T > &aPt3, const GenPoint< T > &aPt4)
 Angle (in [0, 2PI[ radians) between two vectors determined by 4 points.
template<class T>
double qgar::qgAngleDegrees (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2, const GenPoint< T > &aPt3, const GenPoint< T > &aPt4)
 Same as qgar::qgAngle(const GenPoint<T>&,const GenPoint<T>&, const GenPoint<T>&, const GenPoint<T>&), but the result is given in [0, 360[ degrees.
template<class T>
double qgar::qgSlope (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Angle (in [0, PI[ radians) between the X axis and the segment formed by the two given points.
template<class T>
double qgar::qgSlopeDegrees (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Same as qgar::qgSlope(const GenPoint<T>&, const GenPoint<T>&), but the result is given in [0, 180[ degrees.