Artec 3D Scanning SDK  2.0
Public Types | Public Member Functions | Public Attributes | List of all members
artec::sdk::base::Rect< T > Struct Template Reference

Structure that defines rectangle, i.e. two-dimensional range. More...

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

Public Types

typedef T value_type
 

Public Member Functions

 Rect ()
 
 Rect (T left, T top, T right, T 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 whether the point is in rect. More...
 
bool contains (const Point2< T > &p) const
 Check whether the point is 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
 Returns center of rectangle. More...
 

Public Attributes

left
 
top
 
right
 
bottom
 

Detailed Description

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

Structure that defines rectangle, i.e. two-dimensional range.

Definition at line 26 of file Rect.h.

Member Typedef Documentation

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

Definition at line 28 of file Rect.h.

Constructor & Destructor Documentation

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

Definition at line 30 of file Rect.h.

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

Definition at line 33 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 36 of file Rect.h.

Member Function Documentation

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

Returns center of rectangle.

Definition at line 89 of file Rect.h.

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

Check whether the point is in rect.

Definition at line 59 of file Rect.h.

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

Check whether the point is in rect.

Definition at line 66 of file Rect.h.

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

Rect the height.

Definition at line 51 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 57 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 77 of file Rect.h.

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

Definition at line 39 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 55 of file Rect.h.

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

normalize rect

Definition at line 41 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 72 of file Rect.h.

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

Definition at line 74 of file Rect.h.

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

Definition at line 73 of file Rect.h.

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

Returns the size.

Definition at line 53 of file Rect.h.

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

Rect the width.

Definition at line 49 of file Rect.h.

Member Data Documentation

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

Definition at line 94 of file Rect.h.

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

Definition at line 91 of file Rect.h.

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

Definition at line 93 of file Rect.h.

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

Definition at line 92 of file Rect.h.


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