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

Points
[Primitives]


Detailed Description

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


Global geometrical functions which compute points

template<class T>
bool qgar::qgCircleCenter (const GenPoint< T > &t, const GenPoint< T > &p, const GenPoint< T > &q, GenPoint< double > &aCenter)
 Center of the circle passing through three given points.
template<class T>
bool qgar::qgIntersect (const GenSegment< T > &ab, const GenSegment< T > &cd, GenPoint< double > &i, double anAngle=Math::epsilonRadian())
 Intersection of the lines supporting two given segments.
template<class T>
bool qgar::qgIntersect (const GenQgarSegment< T > &aQSeg1, const GenQgarSegment< T > &aQSeg2, GenPoint< double > &aPt, double anAngle=Math::epsilonRadian())
 Intersection of the lines supporting two given Qgar segments.
template<class T>
GenPoint< double > qgar::qgMiddle (const GenSegment< T > &aSeg)
 Return the middle point of a segment.
template<class T>
GenPoint< double > qgar::qgMiddle (const GenQgarSegment< T > &aQSeg)
 Return the middle point of a Qgar segment.
template<class T>
GenPoint< double > qgar::qgMiddle (const GenPoint< T > &aPt1, const GenPoint< T > &aPt2)
 Return the middle point of the segment joining two points.
template<class T>
GenPoint< double > qgar::qgProjectPoint (const GenPoint< T > &aPt, const GenSegment< T > &aSeg)
 Return the orthogonal projection of a point onto a segment.
template<class T>
void qgar::qgProject (GenPoint< double > &aPt, const GenSegment< T > &aSeg)
 Orthogonal projection of a point onto a segment.
template<class T>
GenPoint< double > qgar::qgProjectPoint (const GenPoint< T > &aPt, const GenQgarSegment< T > &aQSeg)
 Return the orthogonal projection of a point onto a Qgar segment.
template<class T>
void qgar::qgProject (GenPoint< double > &aPt, const GenQgarSegment< T > &aQSeg)
 Ortogonal projection of a point onto a Qgar segment.


Function Documentation

template<class T>
bool qgar::qgCircleCenter const GenPoint< T > &  t,
const GenPoint< T > &  p,
const GenPoint< T > &  q,
GenPoint< double > &  aCenter
 

Center of the circle passing through three given points.

Return false if the 3 points are collinear, true otherwise.

Parameters:
t a point
p a point
q a point
aCenter center of the circle
Warning:
The center has double coordinates.

Definition at line 69 of file _QGAR_point.TCC.

References qgar::qgEq0().

Referenced by RWARCVECTOR_meanRadius().

template<class T>
bool qgar::qgIntersect const GenQgarSegment< T > &  aQSeg1,
const GenQgarSegment< T > &  aQSeg2,
GenPoint< double > &  aPt,
double  anAngle = Math::epsilonRadian()
[inline]
 

Intersection of the lines supporting two given Qgar segments.

Return false if the lines supporting the segments are approximately collinear/parallel according to threshold anAngle. Otherwise, assign the intersection point to i and return true.

Parameters:
aQSeg1 a Qgar segment
aQSeg2 a Qgar segment
aPt resulting intersection point
anAngle threshold angle to decide whether current and given segments are collinear or parallel (default qgar::Math::epsilonRadian())
Warning:
The intersection point has double coordinates.

Definition at line 306 of file _QGAR_point.TCC.

References qgar::qgIntersect().

template<class T>
bool qgar::qgIntersect const GenSegment< T > &  ab,
const GenSegment< T > &  cd,
GenPoint< double > &  i,
double  anAngle = Math::epsilonRadian()
 

Intersection of the lines supporting two given segments.

Return false if the lines supporting the segments are approximately collinear/parallel according to threshold anAngle. Otherwise, assign the intersection point to i and return true.

Parameters:
ab a segment (AB)
cd a segment (CD)
i resulting intersection point (I)
anAngle threshold angle to decide whether current and given segments are collinear or parallel (default qgar::Math::epsilonRadian())
Warning:
The intersection point has double coordinates.

Definition at line 164 of file _QGAR_point.TCC.

References qgar::Math::QG_PI, and qgar::qgEq().

Referenced by qgar::qgIntersect().

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

Return the middle point of the segment joining two points.

Parameters:
aPt1 a point
aPt2 a point
Warning:
The resulting point has double coordinates.

Definition at line 350 of file _QGAR_point.TCC.

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

Return the middle point of a Qgar segment.

Parameters:
aQSeg a Qgar segment
Warning:
The resulting point has double coordinates.

Definition at line 339 of file _QGAR_point.TCC.

References qgar::qgMiddle().

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

Return the middle point of a segment.

Parameters:
aSeg a segment
Warning:
The resulting point has double coordinates.

Definition at line 328 of file _QGAR_point.TCC.

Referenced by qgar::qgMiddle().

template<class T>
void qgar::qgProject GenPoint< double > &  aPt,
const GenQgarSegment< T > &  aQSeg
[inline]
 

Ortogonal projection of a point onto a Qgar segment.

Parameters:
aPt a point
aQSeg a Qgar segment
Warning:
The point has double coordinates.
Since:
Qgar 2.2

Definition at line 452 of file _QGAR_point.TCC.

References qgar::qgProject().

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

Orthogonal projection of a point onto a segment.

Parameters:
aPt a point
aSeg a segment
Warning:
The point has double coordinates.
Since:
Qgar 2.2

Definition at line 384 of file _QGAR_point.TCC.

Referenced by qgar::GenPoint< T >::project(), qgar::qgPerpendicular(), qgar::qgProject(), and qgar::qgProjectPoint().

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

Return the orthogonal projection of a point onto a Qgar segment.

Parameters:
aPt a point
aQSeg a Qgar segment
Warning:
The resulting point has double coordinates.
Since:
Qgar 2.2

Definition at line 440 of file _QGAR_point.TCC.

References qgar::qgProjectPoint().

template<class T>
GenPoint< double > qgar::qgProjectPoint const GenPoint< T > &  aPt,
const GenSegment< T > &  aSeg
 

Return the orthogonal projection of a point onto a segment.

Parameters:
aPt a point
aSeg a segment
Warning:
The resulting point has double coordinates.
Since:
Qgar 2.2

Definition at line 369 of file _QGAR_point.TCC.

References qgar::qgProject().

Referenced by qgar::qgProjectPoint().