Inheritance diagram for RS::CoordPoint< T >:


Public Member Functions | |
| CoordPoint () | |
| Default constructor, the point is (T(), T()). | |
| CoordPoint (const T &x, const T &y) | |
| Construct a point using coordinates (x,y). | |
| CoordPoint (const CoordPoint< T > &) | |
| Copyconstructor. | |
| CoordPoint (const CoordPoint< T > &, const CoordVector< T > &) | |
| Create a point using a start point and a vector. | |
| CoordPoint (const CoordVector< T > &) | |
| Explicit constructor for converting a vector to a point. | |
| CoordPoint< T > & | operator= (const CoordPoint< T > &) |
| Assignment operator. | |
| T | getX () const |
| Get the x coordinate of the point. | |
| T | getY () const |
| Get the y coordinate of the point. | |
| CoordPoint< T > & | addX (const T &pt_x) |
| Add to the x coordinate of the point. | |
| CoordPoint< T > & | addY (const T &pt_y) |
| Add to the x coordinate of the point. | |
| CoordPoint< T > & | addXY (const T &pt_x, const T &pt_y) |
| Add to x and y coordinate of the point. | |
| CoordPoint< T > & | setX (const T &pt_x) |
| Set the x coordinate of the point. | |
| CoordPoint< T > & | setY (const T &pt_y) |
| Set the y coordinate of the point. | |
| CoordPoint< T > & | set (const T &pt_x, const T &pt_y) |
| Set the x and y coordinate of the point. | |
| CoordVector< T > | getVectorTo (const CoordPoint< T > &pt) const |
| Get a vector between this point and point given in call. | |
| AngleDegrees< T > | getDirectionTo (const CoordPoint< T > &pt) const |
| Get the direction between this point and point given in call. | |
| T | getDistanceTo (const CoordPoint< T > &pt) const |
| Get the distance between this point and point given in call. | |
Arithmetic operators. | |
| CoordPoint< T > | operator- () const |
| CoordPoint< T > | operator- (const CoordPoint< T > &) const |
| CoordPoint< T > | operator- (const CoordVector< T > &) const |
| CoordPoint< T > | operator+ (const CoordPoint< T > &) const |
| CoordPoint< T > | operator+ (const CoordVector< T > &) const |
| CoordPoint< T > | operator * (const T &) const |
| CoordPoint< T > | operator * (const CoordPoint< T > &) const |
| CoordPoint< T > | operator/ (const T &) const |
| CoordPoint< T > | operator/ (const CoordPoint< T > &) const |
| CoordPoint< T > & | operator-= (const CoordPoint< T > &) |
| CoordPoint< T > & | operator-= (const CoordVector< T > &) |
| CoordPoint< T > & | operator+= (const CoordPoint< T > &) |
| CoordPoint< T > & | operator+= (const CoordVector< T > &) |
| CoordPoint< T > & | operator *= (const T &) |
| CoordPoint< T > & | operator *= (const CoordPoint< T > &) |
| CoordPoint< T > & | operator/= (const T &) |
| CoordPoint< T > & | operator/= (const CoordPoint< T > &) |
Comparison operators. | |
| bool | operator! () const |
| bool | operator== (const CoordPoint< T > &pt) const |
| bool | operator!= (const CoordPoint< T > &pt) const |
Protected Attributes | |
| T | x |
| The actual representation of the x coordinate value. | |
| T | y |
| The actual representation of the y coordinate value. | |
The X and Y values are of type T.
Check if all constructors and methods are needed.
Definition at line 103 of file CoordPoint.h.
|
||||||||||
|
Explicit constructor for converting a vector to a point. This is actually the same as using: CoordPoint<T>(CoordPoint<T>(), vector) since the vector is assumed is from origo. Definition at line 221 of file CoordPoint.h. References RS::cos(), RS::CoordVector< T >::getAngle(), RS::CoordVector< T >::getLength(), RS::sin(), RS::CoordPoint< T >::x, and RS::CoordPoint< T >::y. |
|
||||||||||
|
Get a vector between this point and point given in call. Very usefull! Definition at line 297 of file CoordPoint.h. |
|
||||||||||
|
Get the direction between this point and point given in call. Very usefull! Definition at line 286 of file CoordPoint.h. References RS::CoordPoint< T >::x, and RS::CoordPoint< T >::y. |
|
||||||||||
|
Get the distance between this point and point given in call. Very usefull! Definition at line 291 of file CoordPoint.h. References RS::sqr(), RS::sqrt(), RS::CoordPoint< T >::x, and RS::CoordPoint< T >::y. |
1.3-rc3