|
Jameo Core Library
|
Defines a point. This point is used for 2D-Coordinates. More...
Public Member Functions | |
| Point () | |
| Constructor. Creates point <0,0>. | |
| Point (double x, double y) | |
| Constructor. Creates point <x,y>. | |
| Point (const Vertex2 &v) | |
| double | x () const |
| Returns the x-component of the point. | |
| double | y () const |
| Returns the y-component of the point. | |
| double & | rX () |
| Returns reference to the x-component. | |
| double & | rY () |
| Returns reference to the y-component. | |
| void | setX (double x) |
| void | setY (double y) |
| Point | cWiseMin (const Point &other) const |
| Returns the component-wise minimum of this point and the other point. | |
| Point | cWiseMax (const Point &other) const |
| Returns the component-wise maximum of this point and the other point. | |
| jm::Vertex2 | toVertex2 () const |
| Point & | operator+= (const Point &another) |
| Point & | operator-= (const Point &another) |
Friends | |
| DllExport friend Point | operator+ (const Point &v1, const Point &v2) |
| DllExport friend Point | operator- (const Point &v1, const Point &v2) |
| DllExport friend Point | operator* (const double &d, const Point &p) |
| DllExport friend Point | operator* (const Point &p, const double &d) |
Defines a point. This point is used for 2D-Coordinates.
In opposite to Vertex2 this class has no vector operations. It is only used for 2D-Coordinates. Typically used in combination with Rect.
| jm::Point::Point | ( | ) |
Constructor. Creates point <0,0>.
| jm::Point::Point | ( | double | x, |
| double | y | ||
| ) |
Constructor. Creates point <x,y>.
| x | X-Component of the point. |
| y | Y-Component of the point. |
|
explicit |
Returns the component-wise maximum of this point and the other point.
| other | The other point. |
Returns the component-wise minimum of this point and the other point.
| other | The other point. |
| double & jm::Point::rX | ( | ) |
Returns reference to the x-component.
| double & jm::Point::rY | ( | ) |
Returns reference to the y-component.
| void jm::Point::setX | ( | double | x | ) |
| void jm::Point::setY | ( | double | y | ) |
| jm::Vertex2 jm::Point::toVertex2 | ( | ) | const |
| double jm::Point::x | ( | ) | const |
Returns the x-component of the point.
| double jm::Point::y | ( | ) | const |
Returns the y-component of the point.