...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
2D point in Cartesian coordinate system
template<typename CoordinateType, typename CoordinateSystem> class model::d2::point_xy : public model::point< CoordinateType, 2, CoordinateSystem > { // ... };
Parameter |
Default |
Description |
---|---|---|
typename CoordinateType |
numeric type, for example, double, float, int |
|
typename CoordinateSystem |
cs::cartesian |
coordinate system, defaults to cs::cartesian |
Function |
Description |
Parameters |
---|---|---|
point_xy()
|
Default constructor, does not initialize anything. |
|
point_xy(CoordinateType const & x, CoordinateType const & y)
|
Constructor with x/y values. |
CoordinateType const &: x: CoordinateType const &: y: |
Function |
Description |
Parameters |
Returns |
---|---|---|---|
CoordinateType const & x()
|
Get x-value. |
||
CoordinateType const & y()
|
Get y-value. |
||
void x(CoordinateType const & v)
|
Set x-value. |
CoordinateType const &: v: |
|
void y(CoordinateType const & v)
|
Set y-value. |
CoordinateType const &: v: |
#include <boost/geometry/geometries/point_xy.hpp>
![]() |
Note |
---|---|
Coordinates are not initialized. If the constructor with parameters is
not called and points are not assigned using |