Libargus API
Libargus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
Argus::Rectangle< T > Class Template Reference

Rectangle template class. More...

#include <Types.h>

Inheritance diagram for Argus::Rectangle< T >:
Argus::Tuple< 4, T >

List of all members.

Public Member Functions

 Rectangle ()
 Rectangle (const Tuple< 4, T > &other)
 Rectangle (T init)
 Rectangle (T _left, T _top, T _right, T _bottom)
T & left ()
const T & left () const
T & top ()
const T & top () const
T & right ()
const T & right () const
T & bottom ()
const T & bottom () const
width () const
 Returns the width of the rectangle.
height () const
 Returns the height of the rectangle.
area () const
 Returns the area of the rectangle (width * height).
- Public Member Functions inherited from Argus::Tuple< 4, T >
 Tuple ()
 Tuple (T init)
 Initialize every element of the tuple to a single value.
bool operator== (const Tuple< N, T > &rhs) const
 Returns true when every element in the two tuples are identical.
bool operator!= (const Tuple< N, T > &rhs) const
 Returns true if there are any differences between the two tuples.
Tuple< N, T > & operator+= (const Tuple< N, T > &rhs)
 Adds every element of another tuple to the elements of this tuple.
Tuple< N, T > & operator-= (const Tuple< N, T > &rhs)
 Subtracts every element of another tuple from the elements of this tuple.
Tuple< N, T > & operator*= (const T &rhs)
 Multiplies every element in the tuple by a single value.
Tuple< N, T > & operator/= (const T &rhs)
 Divides every element in the tuple by a single value.
const Tuple< N, T > operator+ (const Tuple< N, T > &rhs) const
 Returns the result of adding another tuple to this tuple.
const Tuple< N, T > operator- (const Tuple< N, T > &rhs) const
 Returns the result of subtracting another tuple from this tuple.
const Tuple< N, T > operator* (const T &rhs) const
 Returns the result of multiplying this tuple by a single value.
const Tuple< N, T > operator/ (const T &rhs) const
 Returns the result of dividing this tuple by a single value.
T & operator[] (unsigned int i)
const T & operator[] (unsigned int i) const

Additional Inherited Members

- Static Public Member Functions inherited from Argus::Tuple< 4, T >
static unsigned int tupleSize ()
 Returns the number of elements in the tuple.
- Protected Attributes inherited from Argus::Tuple< 4, T >
m_data [N]

Detailed Description

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

Rectangle template class.

This is a Tuple specialization containing 4 elements corresponding to the positions of the left, top, right, and bottom edges of a rectangle, in that order. Values can be accessed using the named methods.

Definition at line 697 of file Types.h.


Constructor & Destructor Documentation

template<typename T>
Argus::Rectangle< T >::Rectangle ( )
inline

Definition at line 700 of file Types.h.

template<typename T>
Argus::Rectangle< T >::Rectangle ( const Tuple< 4, T > &  other)
inline

Definition at line 701 of file Types.h.

template<typename T>
Argus::Rectangle< T >::Rectangle ( init)
inline

Definition at line 703 of file Types.h.

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

Definition at line 708 of file Types.h.


Member Function Documentation

template<typename T>
T Argus::Rectangle< T >::area ( ) const
inline

Returns the area of the rectangle (width * height).

Definition at line 732 of file Types.h.

template<typename T>
T& Argus::Rectangle< T >::bottom ( )
inline

Definition at line 722 of file Types.h.

template<typename T>
const T& Argus::Rectangle< T >::bottom ( ) const
inline

Definition at line 723 of file Types.h.

template<typename T>
T Argus::Rectangle< T >::height ( ) const
inline

Returns the height of the rectangle.

Definition at line 729 of file Types.h.

template<typename T>
T& Argus::Rectangle< T >::left ( )
inline

Definition at line 716 of file Types.h.

template<typename T>
const T& Argus::Rectangle< T >::left ( ) const
inline

Definition at line 717 of file Types.h.

template<typename T>
T& Argus::Rectangle< T >::right ( )
inline

Definition at line 720 of file Types.h.

template<typename T>
const T& Argus::Rectangle< T >::right ( ) const
inline

Definition at line 721 of file Types.h.

template<typename T>
T& Argus::Rectangle< T >::top ( )
inline

Definition at line 718 of file Types.h.

template<typename T>
const T& Argus::Rectangle< T >::top ( ) const
inline

Definition at line 719 of file Types.h.

template<typename T>
T Argus::Rectangle< T >::width ( ) const
inline

Returns the width of the rectangle.

Definition at line 726 of file Types.h.


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