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

_QGAR_distance.TCC File Reference


Detailed Description

Implementation of global functions to compute distances between primitives.

Computational geometry equations can be found in the FAQ section of comp.graphics.algorithms. They are based on [Kirk, 1992], pages 199-202, and [O'Rourke, 1994], pages 249-51.

Author:
Gérald Masini
Date:
February 03, 2005 17:58
Since:
Qgar 2.2

Definition in file _QGAR_distance.TCC.

Go to the source code of this file.

Namespaces

namespace  qgar

Global functions to compute distances between primitives

template<class T>
qgar::qgDX (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Difference between X coordinates of the given points: X(aPt1) - X(aPt2).
template<class T>
qgar::qgDY (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Difference between Y coordinates of the given points: Y(aPt1) - Y(aPt2).
template<class T>
double qgar::qgDist (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Distance between two points.
template<class T>
double qgar::qgDist (const GenPoint< T > &c, const GenPoint< T > &a, const GenPoint< T > &b)
 Distance between point c and its a perpendicular projection onto the line passing through points a and b.
template<class T>
double qgar::qgDist (const GenSegment< T > &aSeg)
 Distance between point (0,0) and its perpendicular projection onto the line supporting a segment.
template<class T>
double qgar::qgDist (const GenQgarSegment< T > &aQSeg)
 Distance between point (0,0) and its perpendicular projection onto the line supporting a Qgar segment.
template<class T>
double qgar::qgDist (const GenPoint< T > &aPt, const GenSegment< T > &aSeg)
 Distance between a point and its perpendicular projection onto the line supporting a segment.
template<class T>
double qgar::qgDist (const GenPoint< T > &c, const GenQgarSegment< T > &aQSeg)
 Distance between a point and its perpendicular projection onto the line supporting a Qgar segment.
template<class T>
double qgar::qgSqr_dist (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Squared distance between two points.

Functions

template<>
double qgar::qgDist< double > (const GenPoint< double > &c, const GenPoint< double > &a, const GenPoint< double > &b)