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

Distances
[Primitives]


Detailed Description

Global functions to compute distances between primitives.
#include <qgarlib/primitives.H>


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.


Function Documentation

template<class T>
double qgar::qgDist const GenPoint< T > &  c,
const GenQgarSegment< T > &  aQSeg
[inline]
 

Distance between a point and its perpendicular projection onto the line supporting a Qgar segment.

Always positive.

Parameters:
c a point
aQSeg a Qgar segment

Definition at line 209 of file _QGAR_distance.TCC.

References qgar::qgDist().

template<class T>
double qgar::qgDist const GenPoint< T > &  aPt,
const GenSegment< T > &  aSeg
[inline]
 

Distance between a point and its perpendicular projection onto the line supporting a segment.

Always positive.

Parameters:
aPt a point
aSeg a segment

Definition at line 195 of file _QGAR_distance.TCC.

References qgar::qgDist().

template<class T>
double qgar::qgDist const GenQgarSegment< T > &  aQSeg  )  [inline]
 

Distance between point (0,0) and its perpendicular projection onto the line supporting a Qgar segment.

Always positive.

Parameters:
aQSeg a Qgar segment

Definition at line 181 of file _QGAR_distance.TCC.

References qgar::qgDist().

template<class T>
double qgar::qgDist const GenSegment< T > &  aSeg  )  [inline]
 

Distance between point (0,0) and its perpendicular projection onto the line supporting a segment.

Always positive.

Parameters:
aSeg a segment

Definition at line 167 of file _QGAR_distance.TCC.

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.

Parameters:
c a point
a a point
b a point

Definition at line 119 of file _QGAR_distance.TCC.

References qgar::qgDist().

template<class T>
double qgar::qgDist const GenPoint< T > &  aPt1,
const GenPoint< T > &  aPt2
 

Distance between two points.

Parameters:
aPt1 a point
aPt2 a point

Definition at line 89 of file _QGAR_distance.TCC.

References qgar::qgDX(), and qgar::qgDY().

Referenced by qgar::GenSegment< T >::contains(), qgar::qgDist(), qgar::GenArc< T >::radius(), RWARCVECTOR_bestAttributes(), RWARCVECTOR_maxDeviation(), RWARCVECTOR_meanRadius(), and RWARCVECTOR_squareError().

template<class T>
T qgar::qgDX const GenPoint< T > &  aPt1,
const GenPoint< T > &  aPt2
[inline]
 

Difference between X coordinates of the given points: X(aPt1) - X(aPt2).

Parameters:
aPt1 a point
aPt2 a point

Definition at line 63 of file _QGAR_distance.TCC.

Referenced by qgar::qgDist(), and qgar::qgSqr_dist().

template<class T>
T qgar::qgDY const GenPoint< T > &  aPt1,
const GenPoint< T > &  aPt2
[inline]
 

Difference between Y coordinates of the given points: Y(aPt1) - Y(aPt2).

Parameters:
aPt1 a point
aPt2 a point

Definition at line 76 of file _QGAR_distance.TCC.

Referenced by qgar::qgDist(), and qgar::qgSqr_dist().

template<class T>
double qgar::qgSqr_dist const GenPoint< T > &  aPt1,
const GenPoint< T > &  aPt2
 

Squared distance between two points.

Parameters:
aPt1 a point
aPt2 a point

Definition at line 222 of file _QGAR_distance.TCC.

References qgar::qgDX(), and qgar::qgDY().