1.8
Public Types | Public Member Functions | List of all members
CircleType< Dim > Class Template Reference

A basic circle with a center point and radius. More...

Inheritance diagram for CircleType< Dim >:
Inheritance graph
[legend]

Public Types

using DimType = Dim
 Helper to reference the dimension type. More...
 
- Public Types inherited from ArcType< Dim >
using DimType = Dim
 Helper to reference the dimension type. More...
 

Public Member Functions

constexpr CircleType (const PointType< Dim > &center={}, Dim radius={}) noexcept
 Construct a Circle object. More...
 
template<class T >
PointType< Dim > point_on_circumference (T angle) const noexcept
 Return the point on the circumference of the circle at the given angle. More...
 
constexpr EGT_NODISCARD RectType< Dim > rect () const noexcept
 Get a Rect that covers the circle. More...
 
- Public Member Functions inherited from ArcType< Dim >
constexpr ArcType (const PointType< Dim > &center={}, Dim radius={}, float angle1=0.0f, float angle2=0.0f) noexcept
 Construct an Arc object. More...
 
constexpr EGT_NODISCARD float angle1 () const noexcept
 Get the angle1. More...
 
constexpr void angle1 (float angle) noexcept
 Set the angle1. More...
 
constexpr EGT_NODISCARD float angle2 () const noexcept
 Get the angle2. More...
 
constexpr void angle2 (float angle) noexcept
 Set the angle2. More...
 
constexpr EGT_NODISCARD PointType< Dim > center () const noexcept
 Get the center point. More...
 
constexpr void center (const PointType< Dim > &center) noexcept
 Set the center point. More...
 
EGT_NODISCARD EGT_API bool empty () const noexcept
 Returns true if the arc has no radius. More...
 
constexpr EGT_NODISCARD Dim radius () const noexcept
 Get the radius. More...
 
constexpr void radius (Dim radius) noexcept
 Set the radius. More...
 

Additional Inherited Members

- Protected Attributes inherited from ArcType< Dim >
float m_angle1 {}
 Angle of the arc in radians. More...
 
float m_angle2 {}
 Angle of the arc in radians. More...
 
PointType< Dim > m_center
 Center point of the arc. More...
 
Dim m_radius {0}
 Radius of the arc. More...
 

Detailed Description

template<class Dim>
class egt::v1::CircleType< Dim >

A basic circle with a center point and radius.

Typically Circle, CircleF are used as aliases.

Member Typedef Documentation

◆ DimType

using DimType = Dim

Helper to reference the dimension type.

Constructor & Destructor Documentation

◆ CircleType()

constexpr CircleType ( const PointType< Dim > &  center = {},
Dim  radius = {} 
)
inlineexplicitconstexprnoexcept

Construct a Circle object.

Parameters
centerCenter point of the arc.
radiusRadius of the arc.

Member Function Documentation

◆ point_on_circumference()

PointType<Dim> point_on_circumference ( angle) const
inlinenoexcept

Return the point on the circumference of the circle at the given angle.

Parameters
angleThe angle in radians.

◆ rect()

constexpr EGT_NODISCARD RectType<Dim> rect ( ) const
inlineconstexprnoexcept

Get a Rect that covers the circle.