artec::sdk::base::Rect< T > Struct Template Reference

#include <artec/sdk/base/Rect.h>

Public Types

typedef T value_type
 

Public Member Functions

 Rect ()
 
 Rect (int left, int top, int right, int bottom)
 
 Rect (const Point2< T > &topLeft, const Point2< T > &bottomRight)
 
bool isEmpty () const
 
void normalize ()
 normalize rect More...
 
width () const
 rect the width More...
 
height () const
 rect the height More...
 
Size size () const
 returns the size More...
 
Point2< T > low () const
 returns the low boundaries More...
 
Point2< T > high () const
 returns the low boundaries More...
 
bool contains (T x, T y) const
 check is point in rect More...
 
bool contains (const Point2< T > &p) const
 check is point in rect More...
 
Rectoffset (const Point2< T > &v)
 offset rect More...
 
Rectoperator+= (const Point2< T > &v)
 
Rect operator+ (const Point2< T > &v) const
 
void intersect (const Rect< T > &rect)
 intersect rect More...
 
Point2< T > center () const
 return center of rectangle More...
 

Public Attributes

left
 
top
 
right
 
bottom
 

Detailed Description

template<typename T = int>
struct artec::sdk::base::Rect< T >

Definition at line 25 of file Rect.h.

Member Typedef Documentation

template<typename T = int>
typedef T artec::sdk::base::Rect< T >::value_type

Definition at line 27 of file Rect.h.

Constructor & Destructor Documentation

template<typename T = int>
artec::sdk::base::Rect< T >::Rect ( )
inline

Definition at line 29 of file Rect.h.

template<typename T = int>
artec::sdk::base::Rect< T >::Rect ( int  left,
int  top,
int  right,
int  bottom 
)
inline

Definition at line 32 of file Rect.h.

template<typename T = int>
artec::sdk::base::Rect< T >::Rect ( const Point2< T > &  topLeft,
const Point2< T > &  bottomRight 
)
inline

Definition at line 35 of file Rect.h.

Member Function Documentation

template<typename T = int>
Point2<T> artec::sdk::base::Rect< T >::center ( ) const
inline

return center of rectangle

Definition at line 88 of file Rect.h.

template<typename T = int>
bool artec::sdk::base::Rect< T >::contains ( x,
y 
) const
inline

check is point in rect

Definition at line 58 of file Rect.h.

template<typename T = int>
bool artec::sdk::base::Rect< T >::contains ( const Point2< T > &  p) const
inline

check is point in rect

Definition at line 65 of file Rect.h.

template<typename T = int>
T artec::sdk::base::Rect< T >::height ( ) const
inline

rect the height

Definition at line 50 of file Rect.h.

template<typename T = int>
Point2<T> artec::sdk::base::Rect< T >::high ( ) const
inline

returns the low boundaries

Definition at line 56 of file Rect.h.

template<typename T = int>
void artec::sdk::base::Rect< T >::intersect ( const Rect< T > &  rect)
inline

intersect rect

Definition at line 76 of file Rect.h.

template<typename T = int>
bool artec::sdk::base::Rect< T >::isEmpty ( ) const
inline

Definition at line 38 of file Rect.h.

template<typename T = int>
Point2<T> artec::sdk::base::Rect< T >::low ( ) const
inline

returns the low boundaries

Definition at line 54 of file Rect.h.

template<typename T = int>
void artec::sdk::base::Rect< T >::normalize ( )
inline

normalize rect

Definition at line 40 of file Rect.h.

template<typename T = int>
Rect& artec::sdk::base::Rect< T >::offset ( const Point2< T > &  v)
inline

offset rect

Definition at line 71 of file Rect.h.

template<typename T = int>
Rect artec::sdk::base::Rect< T >::operator+ ( const Point2< T > &  v) const
inline

Definition at line 73 of file Rect.h.

template<typename T = int>
Rect& artec::sdk::base::Rect< T >::operator+= ( const Point2< T > &  v)
inline

Definition at line 72 of file Rect.h.

template<typename T = int>
Size artec::sdk::base::Rect< T >::size ( ) const
inline

returns the size

Definition at line 52 of file Rect.h.

template<typename T = int>
T artec::sdk::base::Rect< T >::width ( ) const
inline

rect the width

Definition at line 48 of file Rect.h.

Member Data Documentation

template<typename T = int>
T artec::sdk::base::Rect< T >::bottom

Definition at line 93 of file Rect.h.

template<typename T = int>
T artec::sdk::base::Rect< T >::left

Definition at line 90 of file Rect.h.

template<typename T = int>
T artec::sdk::base::Rect< T >::right

Definition at line 92 of file Rect.h.

template<typename T = int>
T artec::sdk::base::Rect< T >::top

Definition at line 91 of file Rect.h.


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