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

Represents a 2D, axis-aligned ellipse area_shape. More...

#include <ellipse.h>

Public Member Functions

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

Public Attributes

glm::tvec2< T > center
glm::tvec2< T > radii

Detailed Description

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

Represents a 2D, axis-aligned ellipse area_shape.

Definition at line 18 of file ellipse.h.

Member Function Documentation

◆ bounding_box()

template<std::floating_point T>
trec2< T > ghassanpl::geometry::tellipse< T >::bounding_box ( ) const
inline

Definition at line 48 of file ellipse.h.

◆ calculate_area()

template<std::floating_point T>
T ghassanpl::geometry::tellipse< T >::calculate_area ( ) const
inline

Definition at line 46 of file ellipse.h.

◆ centroid()

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

Definition at line 23 of file ellipse.h.

◆ closest_point_to()

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

Definition at line 50 of file ellipse.h.

◆ contains()

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

Definition at line 25 of file ellipse.h.

◆ edge_length()

template<std::floating_point T>
T ghassanpl::geometry::tellipse< T >::edge_length ( ) const
inline

Definition at line 31 of file ellipse.h.

◆ edge_point()

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

Definition at line 47 of file ellipse.h.

◆ edge_point_alpha()

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

Definition at line 41 of file ellipse.h.

Member Data Documentation

◆ center

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

Definition at line 20 of file ellipse.h.

◆ radii

template<std::floating_point T>
glm::tvec2<T> ghassanpl::geometry::tellipse< T >::radii

Definition at line 21 of file ellipse.h.