Unravel Engine C++ Reference
Loading...
Searching...
No Matches
rect< T > Struct Template Reference

#include <basetypes.hpp>

Public Types

using value_type = T
 

Public Member Functions

 rect ()=default
 
 rect (T _left, T _top, T _right, T _bottom)
 
width () const
 
height () const
 
bool empty () const
 
template<typename T1 = T>
size< T1 > size () const
 
template<typename T1 = T>
point< T1 > center () const
 
template<typename T1 = T>
point< T1 > tl () const
 
template<typename T1 = T>
point< T1 > tr () const
 
template<typename T1 = T>
point< T1 > bl () const
 
template<typename T1 = T>
point< T1 > br () const
 
bool contains (const point< T > &p) const
 
bool operator== (const rect &b) const
 
bool operator!= (const rect &b) const
 
rectoperator+= (const point< T > &p)
 
rectoperator-= (const point< T > &p)
 
bool operator< (const rect &b) const
 
bool operator> (const rect &b) const
 

Static Public Member Functions

static rect intersect (const rect &a, const rect &b)
 
static rect inflate (const rect &rc, T x, T y)
 

Public Attributes

left = 0
 
top = 0
 
right = 0
 
bottom = 0
 

Detailed Description

template<typename T>
struct rect< T >

Definition at line 125 of file basetypes.hpp.

Member Typedef Documentation

◆ value_type

template<typename T >
using rect< T >::value_type = T

Definition at line 127 of file basetypes.hpp.

Constructor & Destructor Documentation

◆ rect() [1/2]

template<typename T >
rect< T >::rect ( )
default

◆ rect() [2/2]

template<typename T >
rect< T >::rect ( T _left,
T _top,
T _right,
T _bottom )
inline

Definition at line 129 of file basetypes.hpp.

Member Function Documentation

◆ bl()

template<typename T >
template<typename T1 = T>
point< T1 > rect< T >::bl ( ) const
inline

Definition at line 174 of file basetypes.hpp.

◆ br()

template<typename T >
template<typename T1 = T>
point< T1 > rect< T >::br ( ) const
inline

Definition at line 179 of file basetypes.hpp.

◆ center()

template<typename T >
template<typename T1 = T>
point< T1 > rect< T >::center ( ) const
inline

Definition at line 157 of file basetypes.hpp.

◆ contains()

template<typename T >
bool rect< T >::contains ( const point< T > & p) const
inline

Definition at line 184 of file basetypes.hpp.

◆ empty()

template<typename T >
bool rect< T >::empty ( ) const
inline

Definition at line 145 of file basetypes.hpp.

◆ height()

template<typename T >
T rect< T >::height ( ) const
inline

Definition at line 141 of file basetypes.hpp.

◆ inflate()

template<typename T >
static rect rect< T >::inflate ( const rect< T > & rc,
T x,
T y )
inlinestatic

Definition at line 278 of file basetypes.hpp.

◆ intersect()

template<typename T >
static rect rect< T >::intersect ( const rect< T > & a,
const rect< T > & b )
inlinestatic

Definition at line 189 of file basetypes.hpp.

◆ operator!=()

template<typename T >
bool rect< T >::operator!= ( const rect< T > & b) const
inline

Definition at line 209 of file basetypes.hpp.

◆ operator+=()

template<typename T >
rect & rect< T >::operator+= ( const point< T > & p)
inline

Definition at line 213 of file basetypes.hpp.

◆ operator-=()

template<typename T >
rect & rect< T >::operator-= ( const point< T > & p)
inline

Definition at line 221 of file basetypes.hpp.

◆ operator<()

template<typename T >
bool rect< T >::operator< ( const rect< T > & b) const
inline

Definition at line 229 of file basetypes.hpp.

◆ operator==()

template<typename T >
bool rect< T >::operator== ( const rect< T > & b) const
inline

Definition at line 205 of file basetypes.hpp.

◆ operator>()

template<typename T >
bool rect< T >::operator> ( const rect< T > & b) const
inline

Definition at line 253 of file basetypes.hpp.

◆ size()

template<typename T >
template<typename T1 = T>
size< T1 > rect< T >::size ( ) const
inline

Definition at line 151 of file basetypes.hpp.

◆ tl()

template<typename T >
template<typename T1 = T>
point< T1 > rect< T >::tl ( ) const
inline

Definition at line 163 of file basetypes.hpp.

◆ tr()

template<typename T >
template<typename T1 = T>
point< T1 > rect< T >::tr ( ) const
inline

Definition at line 168 of file basetypes.hpp.

◆ width()

template<typename T >
T rect< T >::width ( ) const
inline

Definition at line 137 of file basetypes.hpp.

Member Data Documentation

◆ bottom

template<typename T >
T rect< T >::bottom = 0

Definition at line 135 of file basetypes.hpp.

◆ left

template<typename T >
T rect< T >::left = 0

Definition at line 132 of file basetypes.hpp.

◆ right

template<typename T >
T rect< T >::right = 0

Definition at line 134 of file basetypes.hpp.

◆ top

template<typename T >
T rect< T >::top = 0

Definition at line 133 of file basetypes.hpp.


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