class to store 2D points and basic methods More...
#include <point2d.h>
Public Member Functions | |
point2d () | |
~point2d () | |
point2d (const T xx, const T yy) | |
point2d (const T scalar) | |
point2d & | operator= (const point2d &p) |
point2d & | operator= (const T scalar) |
point2d (const point2d< T > &p) | |
point2d | operator+ (const point2d &p) const |
point2d | operator- (const point2d &p) const |
point2d | operator* (const T &a) const |
double | operator* (const point2d &p) const |
T | norm () |
T | norm2 () |
void | print () |
int | find_nearest_point (std::vector< point2d< T > > primitive) |
Find the point in th primitive that is the neareast to point, and returns its index. | |
void | find_nearest_point (std::vector< point2d< T > > primitive, int &id, T &distance) |
Find the point in th primitive that is the neareast to point, and returns its index. | |
bool | operator!= (const T scalar) const |
Public Attributes | |
T | x |
T | y |
class to store 2D points and basic methods
ami::point2d< T >::point2d | ( | ) | [inline] |
ami::point2d< T >::~point2d | ( | ) | [inline] |
ami::point2d< T >::point2d | ( | const T | xx, |
const T | yy | ||
) | [inline] |
ami::point2d< T >::point2d | ( | const T | scalar | ) | [inline] |
ami::point2d< T >::point2d | ( | const point2d< T > & | p | ) | [inline] |
int ami::point2d< T >::find_nearest_point | ( | std::vector< point2d< T > > | primitive | ) |
void ami::point2d< T >::find_nearest_point | ( | std::vector< point2d< T > > | primitive, |
int & | id, | ||
T & | distance | ||
) |
T ami::point2d< T >::norm | ( | ) | [inline] |
T ami::point2d< T >::norm2 | ( | ) | [inline] |
bool ami::point2d< T >::operator!= | ( | const T | scalar | ) | const [inline] |
point2d ami::point2d< T >::operator* | ( | const T & | a | ) | const [inline] |
double ami::point2d< T >::operator* | ( | const point2d< T > & | p | ) | const [inline] |
point2d ami::point2d< T >::operator+ | ( | const point2d< T > & | p | ) | const [inline] |
point2d ami::point2d< T >::operator- | ( | const point2d< T > & | p | ) | const [inline] |
point2d& ami::point2d< T >::operator= | ( | const point2d< T > & | p | ) | [inline] |
point2d& ami::point2d< T >::operator= | ( | const T | scalar | ) | [inline] |
void ami::point2d< T >::print | ( | ) | [inline] |
T ami::point2d< T >::x |
T ami::point2d< T >::y |