1.10 |
An Arc consists of a radius and two angles. More...
#include <geometry.h>
Public Types | |
using | DimType = Dim |
Helper to reference the dimension type. | |
Public Member Functions | |
constexpr | ArcType (const PointType< Dim > ¢er={}, Dim radius={}, float angle1=0.0f, float angle2=0.0f) noexcept |
Construct an Arc object. | |
EGT_NODISCARD constexpr float | angle1 () const noexcept |
Get the angle1. | |
constexpr void | angle1 (float angle) noexcept |
Set the angle1. | |
EGT_NODISCARD constexpr float | angle2 () const noexcept |
Get the angle2. | |
constexpr void | angle2 (float angle) noexcept |
Set the angle2. | |
EGT_NODISCARD constexpr PointType< Dim > | center () const noexcept |
Get the center point. | |
constexpr void | center (const PointType< Dim > ¢er) noexcept |
Set the center point. | |
EGT_NODISCARD EGT_API bool | empty () const noexcept |
Returns true if the arc has no radius. | |
EGT_NODISCARD constexpr Dim | radius () const noexcept |
Get the radius. | |
constexpr void | radius (Dim radius) noexcept |
Set the radius. | |
Protected Attributes | |
float | m_angle1 {} |
Angle of the arc in radians. | |
float | m_angle2 {} |
Angle of the arc in radians. | |
PointType< Dim > | m_center |
Center point of the arc. | |
Dim | m_radius {0} |
Radius of the arc. | |
An Arc consists of a radius and two angles.
Typically Arc is used as an alias.
using DimType = Dim |
Helper to reference the dimension type.
|
inlineexplicitconstexprnoexcept |
Construct an Arc object.
center | Center point of the arc. |
radius | Radius of the arc. |
angle1 | Angle 1 of the arc in radians. |
angle2 | Angle 2 of the arc in radians. |
|
inlineconstexprnoexcept |
Get the angle1.
|
inlineconstexprnoexcept |
Set the angle1.
|
inlineconstexprnoexcept |
Get the angle2.
|
inlineconstexprnoexcept |
Set the angle2.
|
inlineconstexprnoexcept |
Get the center point.
|
inlineconstexprnoexcept |
Set the center point.
|
noexcept |
Returns true if the arc has no radius.
|
inlineconstexprnoexcept |
Get the radius.
|
inlineconstexprnoexcept |
Set the radius.
|
protected |
Angle of the arc in radians.
|
protected |
Angle of the arc in radians.
|
protected |
Center point of the arc.
|
protected |
Radius of the arc.