![]() |
1.11 |
Simple x,y coordinate. More...
#include <geometry.h>
Public Types | |
| using | DimType = Dim |
| Helper to reference the dimension type. | |
Public Member Functions | |
| constexpr | PointType () noexcept=default |
| template<class Dim2 > | |
| constexpr | PointType (const PointType< Dim2 > &p) |
| constexpr | PointType (Dim x, Dim y) noexcept |
| template<class T > | |
| EGT_NODISCARD T | angle_to (const PointType &point) const noexcept |
| Return the angle in radians from this point to get to another. | |
| EGT_NODISCARD Dim | distance_to (const PointType &point) const noexcept |
| Calculate the straight line distance to another point. | |
| constexpr PointType & | operator*= (const PointType &rhs) noexcept |
| PointType operator. | |
| template<class T > | |
| constexpr PointType & | operator*= (const T &rhs) noexcept |
| PointType operator. | |
| constexpr PointType & | operator+= (const PointType &rhs) noexcept |
| PointType operator. | |
| template<class T > | |
| constexpr PointType & | operator+= (const T &rhs) noexcept |
| PointType operator. | |
| constexpr PointType & | operator-= (const PointType &rhs) noexcept |
| PointType operator. | |
| template<class T > | |
| constexpr PointType & | operator-= (const T &rhs) noexcept |
| PointType operator. | |
| constexpr PointType & | operator/= (const PointType &rhs) noexcept |
| PointType operator. | |
| template<class T > | |
| constexpr PointType & | operator/= (const T &rhs) noexcept |
| PointType operator. | |
| template<class T > | |
| PointType | point_on_circumference (T radius, T angle) const noexcept |
| If this point is the center of a circle, return a new point that is on the circumference of the circle at the specified angle. | |
| EGT_NODISCARD constexpr Dim | x () const noexcept |
| Get the x value. | |
| constexpr void | x (Dim x) noexcept |
| Set the x value. | |
| EGT_NODISCARD constexpr Dim | y () const noexcept |
| Get the y value. | |
| constexpr void | y (Dim y) noexcept |
| Set the y value. | |
Protected Attributes | |
| Dim | m_x {0} |
| X value. | |
| Dim | m_y {0} |
| Y value. | |
Simple x,y coordinate.
Typically Point, PointF, DisplayPoint are used as aliases.
| using DimType = Dim |
Helper to reference the dimension type.
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
| [in] | x | X value. |
| [in] | y | Y value. |
|
inlineconstexpr |
|
inlinenoexcept |
Return the angle in radians from this point to get to another.
| point | The other point. |
|
inlinenoexcept |
Calculate the straight line distance to another point.
| point | The other point. |
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlineconstexprnoexcept |
PointType operator.
|
inlinenoexcept |
If this point is the center of a circle, return a new point that is on the circumference of the circle at the specified angle.
| radius | The radius of the circle. |
| angle | The angle in radians. |
|
inlineconstexprnoexcept |
Get the x value.
|
inlineconstexprnoexcept |
Set the x value.
|
inlineconstexprnoexcept |
Get the y value.
|
inlineconstexprnoexcept |
Set the y value.
|
protected |
X value.
|
protected |
Y value.