HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Friends
tt::rect Class Reference

#include <TTauri/Foundation/rect.hpp>

Public Member Functions

tt_force_inline rect (rect const &rhs) noexcept=default
 
tt_force_inline rectoperator= (rect const &rhs) noexcept=default
 
tt_force_inline rect (rect &&rhs) noexcept=default
 
tt_force_inline rectoperator= (rect &&rhs) noexcept=default
 
 rect (vec corner0, vec corner1, vec corner2, vec corner3) noexcept
 
 rect (aarect rhs) noexcept
 
rectoperator= (aarect rhs) noexcept
 
 rect (vec corner0, vec extent) noexcept
 
vec right () const noexcept
 Get the right vector of a rectangle.
 
vec up () const noexcept
 Get the up vector of a rectangle.
 
float width () const noexcept
 
float height () const noexcept
 
vec extent () const noexcept
 
template<size_t I>
tt_force_inline vec corner () const noexcept
 Get coordinate of a corner.
 

Friends

rect expand (rect const &lhs, float rhs) noexcept
 

Detailed Description

Class which represents an axis-aligned rectangle.

Member Function Documentation

◆ corner()

template<size_t I>
tt_force_inline vec tt::rect::corner ( ) const
inlinenoexcept

Get coordinate of a corner.

Parameters
ICorner number: 0 = left-bottom, 1 = right-bottom, 2 = left-top, 3 = right-top.
Returns
The homogeneous coordinate of the corner.

◆ right()

vec tt::rect::right ( ) const
inlinenoexcept

Get the right vector of a rectangle.

◆ up()

vec tt::rect::up ( ) const
inlinenoexcept

Get the up vector of a rectangle.


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