#include <qgarlib/primitives.H>
This class is not supposed to be derived: The destructor (as any other function) is not virtual.
O
+---------------> X
|\ |
| \ <-'
| \ angle (in radians unless specified)
| \
|
V
Y
Definition at line 105 of file _QGAR_GenPoint.H.
Public Types | |
Types | |
| typedef T | value_type |
| Type of the coordinates. | |
| typedef value_type & | reference |
| Reference to qgar::GenPoint::value_type. | |
| typedef const value_type & | const_reference |
| Constant reference to qgar::GenPoint::value_type. | |
| typedef value_type * | pointer |
| Pointer to qgar::GenPoint::value_type. | |
| typedef const value_type * | const_pointer |
| Constant pointer to qgar::GenPoint::value_type. | |
Public Member Functions | |
| template<> | |
| void | project (const GenSegment< double > &aSeg) |
| template<> | |
| void | project (const GenQgarSegment< double > &aQSeg) |
Constructors | |
| GenPoint () | |
| Default constructor: Create a point at (0,0). | |
| GenPoint (const GenPoint< value_type > &aPt) | |
| Copy constructor. | |
| template<class U> | |
| GenPoint (const GenPoint< U > &aPt) | |
| Conversion of a point of a type different from the effective type. | |
| GenPoint (value_type aX, value_type aY) | |
| Initialize from coordinates. | |
Destructor | |
| ~GenPoint () | |
| Non-virtual destructor (see the class header). | |
Access to coordinates | |
| value_type | x () const |
| Get X coordinate. | |
| value_type | y () const |
| Get Y coordinate. | |
| double | rho () const |
| Get radius (rho) in polar coordinates. | |
| double | theta () const |
| Get angle (theta) in polar coordinates. | |
Assign coordinates | |
| void | setX (value_type aX) |
| Set X coordinate. | |
| void | setY (value_type aY) |
| Set Y coordinate. | |
| void | setXY (value_type aX, value_type aY) |
| Set both X and Y coordinates. | |
Operators | |
| |
| GenPoint< value_type > & | operator= (const GenPoint< value_type > &aPt) |
| Assignment. | |
| const GenPoint< value_type > | operator+ (const GenPoint< value_type > &aPt) const |
| Same as function qgar::GenPoint::plus. | |
| GenPoint< value_type > & | operator+= (const GenPoint< value_type > &aPt) |
| Same as function qgar::GenPoint::plusEqual. | |
| const GenPoint< value_type > | operator- (const GenPoint< value_type > &aPt) const |
| Same as function qgar::GenPoint::minus. | |
| GenPoint< value_type > & | operator-= (const GenPoint< value_type > &aPt) |
| Same as function qgar::GenPoint::minusEqual. | |
| bool | operator== (const GenPoint< value_type > &aPt) const |
| Same as function qgar::GenPoint::eq. | |
| bool | operator!= (const GenPoint< value_type > &aPt) const |
| Same as function qgar::GenPoint::notEq. | |
Functional operators | |
| |
| const GenPoint< value_type > | plus (const GenPoint< value_type > &aPt) const |
| Add coordinates of the given point to those of the current point, and return them as a new point. | |
| GenPoint< value_type > & | plusEqual (const GenPoint< value_type > &aPt) |
| Add coordinates of the given point to those of the current point. | |
| const GenPoint< value_type > | minus (const GenPoint< value_type > &aPt) const |
| Substract coordinates of the given point to those of the current point, and return them as a new point. | |
| GenPoint< value_type > & | minusEqual (const GenPoint< value_type > &aPt) |
| Substract coordinates of the given point to those of the current point. | |
| bool | eq (const GenPoint< value_type > &aPt) const |
| Equality. | |
| bool | notEq (const GenPoint< value_type > &aPt) const |
| Inequality. | |
Geometry: projection | |
| void | project (const GenSegment< value_type > &aSeg) |
| Orthogonal projection of the current point onto the line supporting the given segment. | |
| void | project (const GenQgarSegment< value_type > &aQSeg) |
| Orthogonal projection of the current point onto the line supporting the given Qgar segment. | |
Geometry: translation | |
| void | translate (value_type aTransX, value_type aTransY) |
| Translate current point along X and Y axis. | |
Protected Attributes | |
Representation of a point | |
Apply a central symmetry to the current point, using the origin of the coordinates system as the symmetry center. Apply a central symmetry to the current point, using the given point as the symmetry center. Apply a mirror symmetry to the current point, using the line supporting the given segment for the symmetry. | |
| value_type | _x |
| X coordinate. | |
| value_type | _y |
| Y coordinate. | |
|
|||||
|
Constant pointer to qgar::GenPoint::value_type.
Definition at line 140 of file _QGAR_GenPoint.H. |
|
|||||
|
Constant reference to qgar::GenPoint::value_type.
Definition at line 130 of file _QGAR_GenPoint.H. |
|
|||||
|
Pointer to qgar::GenPoint::value_type.
Definition at line 135 of file _QGAR_GenPoint.H. |
|
|||||
|
Reference to qgar::GenPoint::value_type.
Definition at line 125 of file _QGAR_GenPoint.H. |
|
|||||
|
Type of the coordinates.
Definition at line 120 of file _QGAR_GenPoint.H. |
|
|||||||||
|
Default constructor: Create a point at (0,0).
Definition at line 71 of file _QGAR_GenPoint.TCC. |
|
||||||||||
|
Copy constructor.
|
|
||||||||||||||
|
Conversion of a point of a type different from the effective type.
Definition at line 84 of file _QGAR_GenPoint.TCC. |
|
||||||||||||||||
|
Initialize from coordinates.
Definition at line 111 of file _QGAR_GenPoint.TCC. |
|
|||||||||
|
Non-virtual destructor (see the class header).
Definition at line 129 of file _QGAR_GenPoint.TCC. |
|
||||||||||
|
Equality. Return true if the current point and the given point have the same coordinates.
|
|
||||||||||
|
Substract coordinates of the given point to those of the current point, and return them as a new point.
|
|
||||||||||
|
Substract coordinates of the given point to those of the current point. The current point is modified.
|
|
||||||||||
|
Inequality. Return true if the coordinates of the current point and of the given point are different.
|
|
||||||||||
|
Same as function qgar::GenPoint::notEq.
|
|
||||||||||
|
Same as function qgar::GenPoint::plus.
|
|
||||||||||
|
Same as function qgar::GenPoint::plusEqual.
|
|
||||||||||
|
Same as function qgar::GenPoint::minus.
|
|
||||||||||
|
Same as function qgar::GenPoint::minusEqual.
|
|
||||||||||
|
Assignment.
|
|
||||||||||
|
Same as function qgar::GenPoint::eq.
|
|
||||||||||
|
Add coordinates of the given point to those of the current point, and return them as a new point.
|
|
||||||||||
|
Add coordinates of the given point to those of the current point. The current point is modified.
|
|
||||||||||
|
Definition at line 261 of file _QGAR_GenPoint.TCC. References qgar::qgProject(). |
|
||||||||||
|
Definition at line 251 of file _QGAR_GenPoint.TCC. References qgar::qgProject(). |
|
||||||||||
|
Orthogonal projection of the current point onto the line supporting the given Qgar segment.
Definition at line 240 of file _QGAR_GenPoint.TCC. |
|
||||||||||
|
Orthogonal projection of the current point onto the line supporting the given segment.
|
|
|||||||||
|
Get radius (rho) in polar coordinates.
Definition at line 164 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_x, and qgar::GenPoint< T >::_y. |
|
||||||||||
|
Set X coordinate.
Definition at line 190 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_x. Referenced by qgar::DxfFile::retrievePQgarSegment(). |
|
||||||||||||||||
|
Set both X and Y coordinates.
Definition at line 210 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_x, and qgar::GenPoint< T >::_y. Referenced by qgar::HysteresisBinaryImage::HysteresisBinaryImage(), qgar::FreemanChain::reverse(), RWARCVECTOR_bestAttributes(), RWARCVECTOR_thirdPoint(), qgar::BoundingBox::setCorners(), qgar::AbstractGenPrimitive< T >::setSource(), qgar::AbstractGenPrimitive< T >::setSourceTarget(), qgar::AbstractGenPrimitive< T >::setTarget(), qgar::GenPolyline< T >::updateSource(), and qgar::GenPolygon< T >::updateSource(). |
|
||||||||||
|
Set Y coordinate.
Definition at line 200 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_y. Referenced by qgar::DxfFile::retrievePQgarSegment(). |
|
|||||||||
|
Get angle (theta) in polar coordinates.
Definition at line 174 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_x, and qgar::GenPoint< T >::_y. |
|
||||||||||||||||
|
Translate current point along X and Y axis.
Definition at line 276 of file _QGAR_GenPoint.TCC. References qgar::GenPoint< T >::_x, and qgar::GenPoint< T >::_y. Referenced by qgar::LinkedChainList::LinkedChainList(), qgar::WDSegment::set(), and qgar::WDSegment::WDSegment(). |
|
|||||||||
|
|||||||||
|
|||||
|
X coordinate.
Definition at line 608 of file _QGAR_GenPoint.H. Referenced by qgar::GenPoint< T >::rho(), qgar::GenPoint< T >::setX(), qgar::GenPoint< T >::setXY(), qgar::GenPoint< T >::theta(), qgar::GenPoint< T >::translate(), and qgar::GenPoint< T >::x(). |
|
|||||
|
Y coordinate.
Definition at line 613 of file _QGAR_GenPoint.H. Referenced by qgar::GenPoint< T >::rho(), qgar::GenPoint< T >::setXY(), qgar::GenPoint< T >::setY(), qgar::GenPoint< T >::theta(), qgar::GenPoint< T >::translate(), and qgar::GenPoint< T >::y(). |