Interface for the Concept Point. More...
#include <concept_point.hpp>
Coordinates | |
| |
typedef T::coordinate_type | coordinate_type |
Type of the coordinate. | |
static void | set_x (T &p, const coordinate_type &v) |
Changes the x coordinate of a point. | |
static void | set_y (T &p, const coordinate_type &v) |
Changes the y coordinate of a point. | |
static coordinate_type | get_x (const T &p) |
Returns the x coordinate of a point. | |
static coordinate_type | get_y (const T &p) |
Returns the y coordinate of a point. |
Interface for the Concept Point.
This is a "non-intrusive" interface for concept::point. Any type, which conceptually is a Point (i.e. has x/y coordinates that can be accessed/modified), can become a model of this concept, i.e. algorithms of this library will be applicable to it without need of any adaptor class. For that it is enough to provided this interface for that class by specializing this template structure with it and providing definitions for associated types and basic operations.
typedef T::coordinate_type instigate::geometry::concept::point::interface< T >::coordinate_type |
Type of the coordinate.
This must be a numeric type.
static coordinate_type instigate::geometry::concept::point::interface< T >::get_x | ( | const T & | p | ) | [inline, static] |
static coordinate_type instigate::geometry::concept::point::interface< T >::get_y | ( | const T & | p | ) | [inline, static] |
static void instigate::geometry::concept::point::interface< T >::set_x | ( | T & | p, | |
const coordinate_type & | v | |||
) | [inline, static] |
Changes the x coordinate of a point.
[in] | p | is an lvalue of type T |
[in] | v | is the new value for the x coordinate of p |
static void instigate::geometry::concept::point::interface< T >::set_y | ( | T & | p, | |
const coordinate_type & | v | |||
) | [inline, static] |
Changes the y coordinate of a point.
[in] | p | is an lvalue of type T |
[in] | v | is the new value for the y coordinate of p |