HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::translate3 Class Reference

Public Types

using array_type = simd<float, 4>
using value_type = array_type::value_type

Public Member Functions

constexpr translate3 (translate3 const &) noexcept=default
constexpr translate3 (translate3 &&) noexcept=default
constexpr translate3 & operator= (translate3 const &) noexcept=default
constexpr translate3 & operator= (translate3 &&) noexcept=default
constexpr operator array_type () const noexcept
constexpr translate3 (array_type const &other) noexcept
constexpr translate3 (aarectangle const &other) noexcept
constexpr translate3 (aarectangle const &other, float z) noexcept
constexpr translate3 (translate2 const &other) noexcept
constexpr translate3 (translate2 const &other, float z) noexcept
constexpr operator translate2 () const noexcept
constexpr translate3 (vector3 const &other) noexcept
constexpr translate3 (point3 const &other) noexcept
constexpr translate3 (float x, float y, float z=0.0f) noexcept
constexpr float x () const noexcept
constexpr float y () const noexcept
constexpr float z () const noexcept
constexpr float & x () noexcept
constexpr float & y () noexcept
constexpr float & z () noexcept
constexpr translate3 operator~ () const noexcept
constexpr bool holds_invariant () const noexcept

Static Public Member Functions

static constexpr translate3 align (aarectangle src_rectangle, aarectangle dst_rectangle, alignment alignment) noexcept
 Align a rectangle within another rectangle.

Friends

constexpr friend bool operator== (translate3 const &lhs, translate3 const &rhs) noexcept
constexpr translate3 round (translate3 const &rhs) noexcept

Member Function Documentation

◆ align()

constexpr translate3 hi::v1::translate3::align ( aarectangle src_rectangle,
aarectangle dst_rectangle,
alignment alignment )
inlinestaticnodiscardconstexprnoexcept

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: