![]() |
1.9 |
A basic ellipse with a center and 2 radii. More...
Public Types | |
using | DimType = Dim |
Helper to reference the dimension type. More... | |
Public Member Functions | |
constexpr | EllipseType (const PointType< Dim > ¢er={}, Dim radiusa={}, Dim radiusb={}) noexcept |
constexpr EGT_NODISCARD PointType< Dim > | center () const noexcept |
Get the center of the ellipse. More... | |
constexpr void | center (const PointType< Dim > ¢er) noexcept |
Set the center of the ellipse. More... | |
constexpr EGT_NODISCARD Dim | perimeter () const noexcept |
Get the total perimeter of the ellipse. More... | |
template<class T > | |
PointType< Dim > | point_on_circumference (T angle) noexcept |
Return the point on the circumference of the ellipse at the given angle. More... | |
constexpr EGT_NODISCARD Dim | radiusa () const noexcept |
Get the first radius of the ellipse. More... | |
constexpr void | radiusa (const Dim radiusa) noexcept |
Set the first radius of the ellipse. More... | |
constexpr EGT_NODISCARD Dim | radiusb () const noexcept |
Get the second radius of the ellipse. More... | |
constexpr void | radiusb (const Dim radiusb) noexcept |
Set the second radius of the ellipse. More... | |
Protected Attributes | |
PointType< Dim > | m_center |
Center point of the arc. More... | |
Dim | m_radiusa {0} |
A radius. More... | |
Dim | m_radiusb {0} |
B radius. More... | |
A basic ellipse with a center and 2 radii.
using DimType = Dim |
Helper to reference the dimension type.
|
inlineexplicitconstexprnoexcept |
[in] | center | Center of the ellipse. |
[in] | radiusa | First radius of the ellipse. |
[in] | radiusb | Second radius of the ellipse. |
|
inlineconstexprnoexcept |
Get the center of the ellipse.
|
inlineconstexprnoexcept |
Set the center of the ellipse.
|
inlineconstexprnoexcept |
Get the total perimeter of the ellipse.
This is technically just an approximation.
|
inlinenoexcept |
Return the point on the circumference of the ellipse at the given angle.
angle | The angle in radians on the ellipse, with the center in the middle of the ellipse. |
|
inlineconstexprnoexcept |
Get the first radius of the ellipse.
|
inlineconstexprnoexcept |
Set the first radius of the ellipse.
|
inlineconstexprnoexcept |
Get the second radius of the ellipse.
|
inlineconstexprnoexcept |
Set the second radius of the ellipse.
|
protected |
Center point of the arc.
|
protected |
A radius.
|
protected |
B radius.