HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Friends
v1::quad Class Reference

Public Member Functions

constexpr quad (point3 p0, point3 p1, point3 p2, point3 p3) noexcept
 
constexpr quad (quad const &) noexcept=default
 
constexpr quad (quad &&) noexcept=default
 
constexpr quadoperator= (quad const &) noexcept=default
 
constexpr quadoperator= (quad &&) noexcept=default
 
constexpr quad (aarectangle const &rhs) noexcept
 
constexpr quad (rectangle const &rhs) noexcept
 
constexpr vector3 bottom () const noexcept
 The vector from left-bottom to right-bottom.
 
constexpr vector3 top () const noexcept
 The vector from left-top to right-top.
 
constexpr vector3 left () const noexcept
 The vector from left-bottom to left-top.
 
constexpr vector3 right () const noexcept
 The vector from right-bottom to right-top.
 
constexpr f32x4 edge_hypots () const noexcept
 Return the length of each edge.
 
constexpr point3operator[] (std::size_t index) noexcept
 
constexpr point3 const & operator[] (std::size_t index) const noexcept
 
constexpr quadoperator+= (extent2 const &rhs) noexcept
 

Data Fields

point3 p0
 Left-bottom.
 
point3 p1
 Right-bottom.
 
point3 p2
 Left-top.
 
point3 p3
 Right-top.
 

Friends

template<std::size_t I>
constexpr friend point3 const & get (quad const &rhs) noexcept
 
template<std::size_t I>
constexpr friend point3get (quad &rhs) noexcept
 
constexpr std::pair< quad, f32x4 > expand_and_edge_hypots (quad const &lhs, f32x4 const &rhs) noexcept
 Add a border around the quad.
 
constexpr std::pair< quad, f32x4 > expand_and_edge_hypots (quad const &lhs, extent2 const &rhs) noexcept
 Add a border around the quad.
 
constexpr std::pair< quad, f32x4 > shrink_and_edge_hypots (quad const &lhs, extent2 const &rhs) noexcept
 Subtract a border from the quad.
 
constexpr quad operator+ (quad const &lhs, extent2 const &rhs) noexcept
 Add a border around the quad.
 
constexpr quad operator+ (quad const &lhs, float rhs) noexcept
 
constexpr quad operator- (quad const &lhs, extent2 const &rhs) noexcept
 Add a border around the quad.
 
constexpr quad operator- (quad const &lhs, float rhs) noexcept
 
constexpr aarectangle bounding_rectangle (quad const &rhs) noexcept
 
constexpr bool operator== (quad const &lhs, quad const &rhs) noexcept=default
 

Member Function Documentation

◆ bottom()

constexpr vector3 v1::quad::bottom ( ) const
inlineconstexprnoexcept

The vector from left-bottom to right-bottom.

◆ edge_hypots()

constexpr f32x4 v1::quad::edge_hypots ( ) const
inlineconstexprnoexcept

Return the length of each edge.

Returns
{bottom, left, top, right}.

◆ left()

constexpr vector3 v1::quad::left ( ) const
inlineconstexprnoexcept

The vector from left-bottom to left-top.

◆ right()

constexpr vector3 v1::quad::right ( ) const
inlineconstexprnoexcept

The vector from right-bottom to right-top.

◆ top()

constexpr vector3 v1::quad::top ( ) const
inlineconstexprnoexcept

The vector from left-top to right-top.

Friends And Related Symbol Documentation

◆ expand_and_edge_hypots [1/2]

constexpr std::pair< quad, f32x4 > expand_and_edge_hypots ( quad const & lhs,
extent2 const & rhs )
friend

Add a border around the quad.

Move each corner of the quad by the given size outward in the direction of the edges.

Parameters
lhsA quad.
rhsThe width and height to add to each corner of the quad.
Returns
The new quad extended by the size and the new edge-lengths.

◆ expand_and_edge_hypots [2/2]

constexpr std::pair< quad, f32x4 > expand_and_edge_hypots ( quad const & lhs,
f32x4 const & rhs )
friend

Add a border around the quad.

Move each corner of the quad by the given size outward in the direction of the edges.

Parameters
lhsA quad.
rhsThe width and height to add to each corner of the quad, only (x, y) are used.
Returns
The new quad extended by the size and the new edge-lengths.

◆ operator+

constexpr quad operator+ ( quad const & lhs,
extent2 const & rhs )
friend

Add a border around the quad.

Move each corner of the quad by the given size outward in the direction of the edges.

Parameters
lhsA quad.
rhsThe width and height to add to each corner of the quad.
Returns
The new quad extended by the size.

◆ operator-

constexpr quad operator- ( quad const & lhs,
extent2 const & rhs )
friend

Add a border around the quad.

Move each corner of the quad by the given size outward in the direction of the edges.

Parameters
lhsA quad.
rhsThe width and height to add to each corner of the quad.
Returns
The new quad extended by the size.

◆ shrink_and_edge_hypots

constexpr std::pair< quad, f32x4 > shrink_and_edge_hypots ( quad const & lhs,
extent2 const & rhs )
friend

Subtract a border from the quad.

Move each corner of the quad by the given size inward in the direction of the edges.

Parameters
lhsA quad.
rhsThe width and height to subtract from each corner of the quad.
Returns
The new quad shrunk by the size and the new edge-lengths.

Field Documentation

◆ p0

point3 v1::quad::p0

Left-bottom.

◆ p1

point3 v1::quad::p1

Right-bottom.

◆ p2

point3 v1::quad::p2

Left-top.

◆ p3

point3 v1::quad::p3

Right-top.


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