4 #include "MCRCProgramming.hpp"
5 #include "flumy_export.hpp"
18 Point2D (
const MP_real & x = 0. ,
const MP_real & y = 0. ) ;
29 bool do_round =
false ) ;
36 Point2D &
reset (
const MP_real & x = 0. ,
const MP_real & y = 0. ) ;
56 Point2D & operator *= (
const MP_real & ) ;
58 Point2D & operator /= (
const MP_real & ) ;
61 bool operator == (
const Point2D & )
const ;
63 bool operator != (
const Point2D & )
const ;
108 friend std::ostream & operator << ( std::ostream & ,
const Point2D & ) ;
110 friend std::istream & operator >> ( std::istream & ,
Point2D & ) ;
Storage class for 2D points.
Definition: Point2D.hpp:13
MP_real scalar(const Point2D &) const
Return the scalar product (_x*x + _y*y) between current point and given point reference.
Point2D & rotate_half_pi()
Rotate 90° current point anticlockwise.
MP_real get_ordinate() const
Assessors get to the _y protected member variable.
Definition: Point2D.hpp:99
Point2D & rotate_pi()
Rotate 180° current point anticlockwise.
Point2D(const MP_real &x=0., const MP_real &y=0.)
Default constructor.
Point2D(const Point2D &)
Copy constructor.
MP_real _y
Point ordinate.
Definition: Point2D.hpp:117
Point2D & rotate(const Point2D ¢er, const MP_real &cosinus, const MP_real &sinus)
Rotate a point around a center given the cosinus and the sinus of the angle.
MP_real get_abscissa() const
Assessors get to the _x protected member variable.
Definition: Point2D.hpp:95
MP_string debug() const
Get debug information.
MP_real _x
Point abscissa.
Definition: Point2D.hpp:115
virtual ~Point2D()
Destructor.
Point2D & transform(const Point2D &translate, const Point2D &dilate, bool do_round=false)
Return new point dilated.
Point2D & reset(const MP_real &x=0., const MP_real &y=0.)
Reset current point coordinates to new values.
MP_real vectorial(const Point2D &) const
Return the vectorial product (_x*y - _y*x) between current point and given point reference.
friend MP_real sqnorm(const Point2D &)
Return the square norm of segment between origin and given point.
friend MP_real arc_tan(const Point2D &)
Return the arc tangante between origin and given point.
MP_real distance(const Point2D &) const
Return distance between current point and given point reference.
void set_abscissa(MP_real x)
Assessors set to the _x protected member variable.
Definition: Point2D.hpp:97
Point2D & rotate(const Point2D ¢er, const MP_real &angle)
Rotate a point around a center (angle in radian)
void set_ordinate(MP_real y)
Assessors set to the _y protected member variable.
Definition: Point2D.hpp:101
friend MP_real lgth(const Point2D &)
Return the distance of the segment between origin and given point.
Point2D & rotate_inv(const Point2D ¢er, const MP_real &cosinus, const MP_real &sinus)
Inverse rotate a point around a center given the cosinus and the sinus of the angle.
Point2D & rotate_inv(const Point2D ¢er, const MP_real &angle)
Inverse rotate a point around a center (angle in radian)