Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::Rectangle< T > Class Template Reference

2-dimensional integer rectangle. More...

#include <kanzi/core/math/rectangle.hpp>

Public Member Functions

T getHeight () const
 Gets height. More...
 
T getWidth () const
 Gets width. More...
 
T getX () const
 Gets X offset. More...
 
T getY () const
 Gets Y offset. More...
 
 Rectangle ()
 Empty constructor. More...
 
 Rectangle (T x, T y, T width, T height)
 Constructor. More...
 
void setHeight (T height)
 Sets height. More...
 
void setWidth (T width)
 Sets width. More...
 
void setX (T x)
 Sets X offset. More...
 
void setY (T y)
 Sets Y offset. More...
 

Friends

bool operator!= (const Rectangle< T > &lhs, const Rectangle< T > &rhs)
 Not equals operator. More...
 
bool operator== (const Rectangle< T > &lhs, const Rectangle< T > &rhs)
 Equals operator. More...
 

Detailed Description

template<typename T>
class kanzi::Rectangle< T >

2-dimensional integer rectangle.

The rectangle sizes remain non-negative for all operations as long as the input sizes are non-negative.

Constructor & Destructor Documentation

template<typename T>
kanzi::Rectangle< T >::Rectangle ( )
inlineexplicit

Empty constructor.

template<typename T>
kanzi::Rectangle< T >::Rectangle ( T  x,
T  y,
T  width,
T  height 
)
inlineexplicit

Constructor.

Member Function Documentation

template<typename T>
T kanzi::Rectangle< T >::getX ( ) const
inline

Gets X offset.

template<typename T>
T kanzi::Rectangle< T >::getY ( ) const
inline

Gets Y offset.

template<typename T>
T kanzi::Rectangle< T >::getWidth ( ) const
inline

Gets width.

template<typename T>
T kanzi::Rectangle< T >::getHeight ( ) const
inline

Gets height.

template<typename T>
void kanzi::Rectangle< T >::setX ( T  x)
inline

Sets X offset.

Parameters
xNew offset.
template<typename T>
void kanzi::Rectangle< T >::setY ( T  y)
inline

Sets Y offset.

Parameters
yNew offset.
template<typename T>
void kanzi::Rectangle< T >::setWidth ( T  width)
inline

Sets width.

Parameters
widthNew width.
template<typename T>
void kanzi::Rectangle< T >::setHeight ( T  height)
inline

Sets height.

Parameters
heightNew height.

Friends And Related Function Documentation

template<typename T>
bool operator== ( const Rectangle< T > &  lhs,
const Rectangle< T > &  rhs 
)
friend

Equals operator.

Parameters
lhsLeft-hand-side operand of the comparison.
rhsRight-hand-side operand of the comparison.
template<typename T>
bool operator!= ( const Rectangle< T > &  lhs,
const Rectangle< T > &  rhs 
)
friend

Not equals operator.

Parameters
lhsLeft-hand-side operand of the comparison.
rhsRight-hand-side operand of the comparison.

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