OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
Rect< T > Struct Template Reference

#include <Rect.h>

Public Member Functions

 Rect ()=default
 
 Rect (T x, T y, T w, T h)
 
 Rect (Point< T > topLeft, Size< T > size)
 
 Rect (Point< T > topLeft, Point< T > bottomRight)
 
bool contains (const Point< T > &point)
 
Point< T > topLeft () const
 
Point< T > bottomRight () const
 
Point< T > topRight () const
 
Point< T > bottomLeft () const
 
Point< T > center () const
 
Size< T > size () const
 
bool intersects (const Rect< T > &other) const
 
Rect< T > intersection (const Rect< T > &other) const
 
bool isEmpty () const
 

Public Attributes

x = 0
 
y = 0
 
w = 0
 
h = 0
 

Friends

bool operator== (const Rect &l, const Rect &r)=default
 

Constructor & Destructor Documentation

◆ Rect() [1/4]

template<class T >
Rect< T >::Rect ( )
default

◆ Rect() [2/4]

template<class T >
Rect< T >::Rect ( x,
y,
w,
h 
)
inline

◆ Rect() [3/4]

template<class T >
Rect< T >::Rect ( Point< T >  topLeft,
Size< T >  size 
)
inline

◆ Rect() [4/4]

template<class T >
Rect< T >::Rect ( Point< T >  topLeft,
Point< T >  bottomRight 
)
inline

Member Function Documentation

◆ bottomLeft()

template<class T >
Point< T > Rect< T >::bottomLeft ( ) const
inline

◆ bottomRight()

template<class T >
Point< T > Rect< T >::bottomRight ( ) const
inline

◆ center()

template<class T >
Point< T > Rect< T >::center ( ) const
inline

◆ contains()

template<class T >
bool Rect< T >::contains ( const Point< T > &  point)
inline

◆ intersection()

template<class T >
Rect< T > Rect< T >::intersection ( const Rect< T > &  other) const
inline

◆ intersects()

template<class T >
bool Rect< T >::intersects ( const Rect< T > &  other) const
inline

◆ isEmpty()

template<class T >
bool Rect< T >::isEmpty ( ) const
inline

◆ size()

template<class T >
Size< T > Rect< T >::size ( ) const
inline

◆ topLeft()

template<class T >
Point< T > Rect< T >::topLeft ( ) const
inline

◆ topRight()

template<class T >
Point< T > Rect< T >::topRight ( ) const
inline

Friends And Related Function Documentation

◆ operator==

template<class T >
bool operator== ( const Rect< T > &  l,
const Rect< T > &  r 
)
friend

Member Data Documentation

◆ h

template<class T >
T Rect< T >::h = 0

◆ w

template<class T >
T Rect< T >::w = 0

◆ x

template<class T >
T Rect< T >::x = 0

◆ y

template<class T >
T Rect< T >::y = 0

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