HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends
hi::v1::geo::corner_radii< T > Class Template Reference

#include <hikogui/geometry/corner_radii.hpp>

Public Types

using value_type = T
 
using array_type = simd<value_type, 4>
 

Public Member Functions

constexpr corner_radii (corner_radii const &) noexcept=default
 
constexpr corner_radii (corner_radii &&) noexcept=default
 
constexpr corner_radiioperator= (corner_radii const &) noexcept=default
 
constexpr corner_radiioperator= (corner_radii &&) noexcept=default
 
constexpr corner_radii (value_type radius) noexcept
 
constexpr corner_radii (value_type lb, value_type rb, value_type lt, value_type rt) noexcept
 
constexpr corner_radii (array_type v) noexcept
 Construct a corner_radii from a simd.
 
constexpr operator array_type () const noexcept
 
constexpr value_type left_bottom () const noexcept
 
constexpr value_type right_bottom () const noexcept
 
constexpr value_type left_top () const noexcept
 
constexpr value_type right_top () const noexcept
 
constexpr value_type & left_bottom () noexcept
 
constexpr value_type & right_bottom () noexcept
 
constexpr value_type & left_top () noexcept
 
constexpr value_type & right_top () noexcept
 
constexpr float operator[] (std::size_t i) const noexcept
 Get the corner radius by index.
 

Friends

template<int I>
constexpr friend float get (corner_radii const &rhs) noexcept
 Get the corner radius by index.
 
constexpr friend corner_radii operator+ (corner_radii const &lhs, value_type rhs) noexcept
 
constexpr friend corner_radii operator- (corner_radii const &lhs, value_type rhs) noexcept
 
constexpr friend corner_radii operator* (corner_radii const &lhs, value_type rhs) noexcept
 
constexpr friend corner_radii round (corner_radii const &rhs) noexcept
 
constexpr friend corner_radii floor (corner_radii const &rhs) noexcept
 
constexpr friend corner_radii ceil (corner_radii const &rhs) noexcept
 

Detailed Description

template<typename T>
class hi::v1::geo::corner_radii< T >

The 4 radii of the corners of a quad or rectangle.

Constructor & Destructor Documentation

◆ corner_radii()

template<typename T >
constexpr hi::v1::geo::corner_radii< T >::corner_radii ( array_type v)
inlineexplicitconstexprnoexcept

Construct a corner_radii from a simd.

Parameters
vThe 4 radii, x=left-bottom, y=right-bottom, z=left-top, w=right-top.

Member Function Documentation

◆ operator[]()

template<typename T >
constexpr float hi::v1::geo::corner_radii< T >::operator[] ( std::size_t i) const
inlineconstexprnoexcept

Get the corner radius by index.

Parameters
iThe index; 0=left-bottom, 1=right-bottom, 2=left-top, 3=right-top.
Returns
The corner radius.

Friends And Related Symbol Documentation

◆ get

template<typename T >
template<int I>
constexpr friend float get ( corner_radii< T > const & rhs)
friend

Get the corner radius by index.

Template Parameters
IThe index; 0=left-bottom, 1=right-bottom, 2=left-top, 3=right-top.
Returns
The corner radius.

The documentation for this class was generated from the following file: