2-dimensional point with double precision coordinates More...
#include <point.hpp>
Public Member Functions | |
Special member functions | |
| ~point () throw () | |
| Destructor. | |
| point () throw () | |
| Default constructor. | |
| point (coordinate_type x, coordinate_type y) throw () | |
| Create point with given coordinates. | |
| point (const point &p) throw () | |
| Copy constructor. | |
| template<typename P > | |
| point (const P &p) | |
| Copy constructor from any other point. | |
| point & | operator= (const point &p) throw () |
| Assignment operator. | |
| template<typename P > | |
| point & | operator= (const P &p) |
| Template assignment operator. | |
Coordinates of the point | |
|
| |
| typedef double | coordinate_type |
| Point coordinate type. | |
| void | set_x (const coordinate_type &v) throw () |
| Sets the x coordinate of the point with given value. | |
| void | set_y (const coordinate_type &v) throw () |
| Sets the y coordinate of the point with given value. | |
| coordinate_type | get_x () const throw () |
| Gets the x coordinate of the point. | |
| coordinate_type | get_y () const throw () |
| Gets the y coordinate of the point. | |
2-dimensional point with double precision coordinates
This class is model of instigate::geometry::concept::point
| instigate::geometry::point::point | ( | coordinate_type | x, | |
| coordinate_type | y | |||
| ) | throw () |
Create point with given coordinates.
| x | is the x coordinate | |
| y | is the y coordinate |
| instigate::geometry::point::point | ( | const point & | p | ) | throw () |
Copy constructor.
| p | - object to copy from |
| instigate::geometry::point::point | ( | const P & | p | ) | [inline] |
Copy constructor from any other point.
| p | - another point object |
References CHECK.
| coordinate_type instigate::geometry::point::get_x | ( | ) | const throw () |
Gets the x coordinate of the point.
Referenced by operator=().
| coordinate_type instigate::geometry::point::get_y | ( | ) | const throw () |
Gets the y coordinate of the point.
Referenced by operator=().
| point& instigate::geometry::point::operator= | ( | const P & | p | ) | [inline] |
Template assignment operator.
| p | - object to copy from |
References CHECK, CHECK_CONVERTIBILITY, get_x(), and get_y().
Assignment operator.
| p | - object to copy from |
| void instigate::geometry::point::set_x | ( | const coordinate_type & | v | ) | throw () |
Sets the x coordinate of the point with given value.
| [in] | v | is the value to be set |
| void instigate::geometry::point::set_y | ( | const coordinate_type & | v | ) | throw () |
Sets the y coordinate of the point with given value.
| [in] | v | is the value to be set |