header_utils
Loading...
Searching...
No Matches
ghassanpl::geometry::tcircle< T > Struct Template Reference

Represents a 2D circle area_shape. More...

#include <circle.h>

Public Member Functions

auto const & centroid () const
constexpr bool is_valid () const noexcept
constexpr tcircle valid () const noexcept
constexpr bool contains (glm::tvec2< T > pt) const noexcept
constexpr T edge_length () const noexcept
constexpr glm::tvec2< T > edge_point_alpha (T t) const
constexpr T calculate_area () const noexcept
constexpr glm::tvec2< T > edge_point (T t) const noexcept
constexpr trec2< T > bounding_box () const noexcept
glm::tvec2< T > closest_point_to (glm::tvec2< T > pt) const

Public Attributes

glm::tvec2< T > center
T radius

Detailed Description

template<std::floating_point T>
struct ghassanpl::geometry::tcircle< T >

Represents a 2D circle area_shape.

Definition at line 18 of file circle.h.

Member Function Documentation

◆ bounding_box()

template<std::floating_point T>
trec2< T > ghassanpl::geometry::tcircle< T >::bounding_box ( ) const
inlineconstexprnoexcept

Definition at line 54 of file circle.h.

◆ calculate_area()

template<std::floating_point T>
T ghassanpl::geometry::tcircle< T >::calculate_area ( ) const
inlineconstexprnoexcept

Definition at line 52 of file circle.h.

◆ centroid()

template<std::floating_point T>
auto const & ghassanpl::geometry::tcircle< T >::centroid ( ) const
inline

Definition at line 23 of file circle.h.

◆ closest_point_to()

template<std::floating_point T>
glm::tvec2< T > ghassanpl::geometry::tcircle< T >::closest_point_to ( glm::tvec2< T > pt) const
inline

Definition at line 56 of file circle.h.

◆ contains()

template<std::floating_point T>
bool ghassanpl::geometry::tcircle< T >::contains ( glm::tvec2< T > pt) const
inlineconstexprnoexcept

Definition at line 35 of file circle.h.

◆ edge_length()

template<std::floating_point T>
T ghassanpl::geometry::tcircle< T >::edge_length ( ) const
inlineconstexprnoexcept

Definition at line 41 of file circle.h.

◆ edge_point()

template<std::floating_point T>
glm::tvec2< T > ghassanpl::geometry::tcircle< T >::edge_point ( T t) const
inlineconstexprnoexcept

Definition at line 53 of file circle.h.

◆ edge_point_alpha()

template<std::floating_point T>
glm::tvec2< T > ghassanpl::geometry::tcircle< T >::edge_point_alpha ( T t) const
inlineconstexpr

Definition at line 46 of file circle.h.

◆ is_valid()

template<std::floating_point T>
bool ghassanpl::geometry::tcircle< T >::is_valid ( ) const
inlineconstexprnoexcept

Definition at line 25 of file circle.h.

◆ valid()

template<std::floating_point T>
tcircle ghassanpl::geometry::tcircle< T >::valid ( ) const
inlineconstexprnoexcept

Definition at line 30 of file circle.h.

Member Data Documentation

◆ center

template<std::floating_point T>
glm::tvec2<T> ghassanpl::geometry::tcircle< T >::center

Definition at line 20 of file circle.h.

◆ radius

template<std::floating_point T>
T ghassanpl::geometry::tcircle< T >::radius

Definition at line 21 of file circle.h.