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

Public Types

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

Public Member Functions

constexpr translate (translate const &) noexcept=default
 
constexpr translate (translate &&) noexcept=default
 
constexpr translateoperator= (translate const &) noexcept=default
 
constexpr translateoperator= (translate &&) noexcept=default
 
constexpr operator matrix< 2 > () const noexcept
 
constexpr operator matrix< 3 > () const noexcept
 
constexpr translate (identity const &) noexcept
 
constexpr operator array_type () const noexcept
 
constexpr translate (array_type const &other) noexcept
 
constexpr translate (axis_aligned_rectangle< value_type > const &other) noexcept
 
constexpr translate (axis_aligned_rectangle< value_type > const &other, value_type z) noexcept
 
template<int E>
requires (E < D)
constexpr translate (translate< value_type, E > const &other) noexcept
 
template<int E>
requires (E < D)
constexpr translate (translate< value_type, E > const &other, value_type z) noexcept
 
template<int E>
requires (E <= D)
constexpr translate (vector< value_type, E > const &other) noexcept
 
template<int E>
requires (E <= D)
constexpr translate (point< value_type, E > const &other) noexcept
 
constexpr translate (value_type x, value_type y) noexcept
 
constexpr translate (value_type x, value_type y, value_type z=value_type{0}) noexcept
 
constexpr value_type x () const noexcept
 
constexpr value_type y () const noexcept
 
constexpr value_type z () const noexcept
 
constexpr value_type & x () noexcept
 
constexpr value_type & y () noexcept
 
constexpr value_type & z () noexcept
 
template<int E>
constexpr vector< value_type, E > operator* (vector< value_type, E > const &rhs) const noexcept
 
template<int E>
constexpr point< value_type, std::max(D, E)> operator* (point< value_type, E > const &rhs) const noexcept
 
constexpr axis_aligned_rectangle< value_type > operator* (axis_aligned_rectangle< value_type > const &rhs) const noexcept
 
constexpr rectangle operator* (axis_aligned_rectangle< value_type > const &rhs) const noexcept
 
constexpr rectangle operator* (rectangle const &rhs) const noexcept
 
constexpr quad operator* (quad const &rhs) const noexcept
 
constexpr circle operator* (circle const &rhs) const noexcept
 
constexpr line_segment operator* (line_segment const &rhs) const noexcept
 
constexpr translate operator* (identity const &) const noexcept
 
template<int E>
requires std::is_same_v<value_type, float>
constexpr auto operator* (matrix< E > const &rhs) const noexcept
 
template<int E>
requires std::is_same_v<value_type, float>
constexpr auto operator* (rotate< E > const &rhs) const noexcept
 
template<int E>
constexpr auto operator* (translate< value_type, E > const &rhs) const noexcept
 
template<int E>
constexpr bool operator== (translate< value_type, E > const &rhs) const noexcept
 
constexpr translate operator~ () const noexcept
 
constexpr bool holds_invariant () const noexcept
 

Static Public Member Functions

static constexpr translate align (axis_aligned_rectangle< value_type > src_rectangle, axis_aligned_rectangle< value_type > dst_rectangle, alignment alignment) noexcept
 Align a rectangle within another rectangle.
 

Friends

constexpr friend point< value_type, 2 > & operator*= (point< value_type, 2 > &lhs, translate const &rhs) noexcept
 
constexpr friend axis_aligned_rectangle< value_type > & operator*= (axis_aligned_rectangle< value_type > &lhs, translate const &rhs) noexcept
 
constexpr translate round (translate const &rhs) noexcept
 

Member Function Documentation

◆ align()

template<typename T , int D>
static constexpr translate v1::geo::translate< T, D >::align ( axis_aligned_rectangle< value_type > src_rectangle,
axis_aligned_rectangle< value_type > dst_rectangle,
alignment alignment )
inlinestaticconstexprnoexcept

Align a rectangle within another rectangle.

Parameters
src_rectangleThe rectangle to translate into the dst_rectangle
dst_rectangleThe destination rectangle.
alignmentHow the source rectangle should be aligned inside the destination rectangle.
Returns
Translation to move the src_rectangle into the dst_rectangle.

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