![]() |
1.11 |
A basic ellipse with a center and 2 radii. More...
#include <geometry.h>
Public Types | |
| using | DimType = Dim |
| Helper to reference the dimension type. | |
Public Member Functions | |
| template<class Dim2 > | |
| constexpr | EllipseType (const EllipseType< Dim2 > &e) |
| constexpr | EllipseType (const PointType< Dim > ¢er={}, Dim radiusa={}, Dim radiusb={}) noexcept |
| EGT_NODISCARD constexpr PointType< Dim > | center () const noexcept |
| Get the center of the ellipse. | |
| constexpr void | center (const PointType< Dim > ¢er) noexcept |
| Set the center of the ellipse. | |
| EGT_NODISCARD constexpr Dim | perimeter () const noexcept |
| Get the total perimeter of the ellipse. | |
| template<class T > | |
| PointType< Dim > | point_on_circumference (T angle) noexcept |
| Return the point on the circumference of the ellipse at the given angle. | |
| EGT_NODISCARD constexpr Dim | radiusa () const noexcept |
| Get the first radius of the ellipse. | |
| constexpr void | radiusa (const Dim radiusa) noexcept |
| Set the first radius of the ellipse. | |
| EGT_NODISCARD constexpr Dim | radiusb () const noexcept |
| Get the second radius of the ellipse. | |
| constexpr void | radiusb (const Dim radiusb) noexcept |
| Set the second radius of the ellipse. | |
Protected Attributes | |
| PointType< Dim > | m_center |
| Center point of the arc. | |
| Dim | m_radiusa {0} |
| A radius. | |
| Dim | m_radiusb {0} |
| B radius. | |
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. |
|
inlineconstexpr |
|
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.