Jetson Linux API Reference

39.2 Release
Argus::Rectangle< T > Class Template Reference

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 784 of file Types.h.

Inheritance diagram for Argus::Rectangle< T >:
Collaboration diagram for Argus::Rectangle< T >:

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. More...
 
height () const
 Returns the height of the rectangle. More...
 
area () const
 Returns the area of the rectangle (width * height). More...
 
bool operator== (const Tuple< N, T > &rhs) const
 Returns true when every element in the two tuples are identical. More...
 
bool operator!= (const Tuple< N, T > &rhs) const
 Returns true if there are any differences between the two tuples. More...
 
Tuple< N, T > & operator+= (const Tuple< N, T > &rhs)
 Adds every element of another tuple to the elements of this tuple. More...
 
Tuple< N, T > & operator-= (const Tuple< N, T > &rhs)
 Subtracts every element of another tuple from the elements of this tuple. More...
 
Tuple< N, T > & operator*= (const T &rhs)
 Multiplies every element in the tuple by a single value. More...
 
Tuple< N, T > & operator/= (const T &rhs)
 Divides every element in the tuple by a single value. More...
 
const Tuple< N, T > operator+ (const Tuple< N, T > &rhs) const
 Returns the result of adding another tuple to this tuple. More...
 
const Tuple< N, T > operator- (const Tuple< N, T > &rhs) const
 Returns the result of subtracting another tuple from this tuple. More...
 
const Tuple< N, T > operator* (const T &rhs) const
 Returns the result of multiplying this tuple by a single value. More...
 
const Tuple< N, T > operator/ (const T &rhs) const
 Returns the result of dividing this tuple by a single value. More...
 
T & operator[] (unsigned int i)
 
const T & operator[] (unsigned int i) const
 

Static Public Member Functions

static unsigned int tupleSize ()
 Returns the number of elements in the tuple. More...
 

Protected Attributes

m_data [N]
 

Constructor & Destructor Documentation

◆ Rectangle() [1/4]

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

Definition at line 787 of file Types.h.

◆ Rectangle() [2/4]

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

Definition at line 788 of file Types.h.

◆ Rectangle() [3/4]

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

Definition at line 790 of file Types.h.

◆ Rectangle() [4/4]

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

Definition at line 795 of file Types.h.

Member Function Documentation

◆ area()

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

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

Definition at line 819 of file Types.h.

◆ bottom() [1/2]

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

◆ bottom() [2/2]

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

Definition at line 810 of file Types.h.

◆ height()

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

Returns the height of the rectangle.

Definition at line 816 of file Types.h.

Referenced by Argus::Rectangle< uint32_t >::area().

◆ left() [1/2]

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

◆ left() [2/2]

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

Definition at line 804 of file Types.h.

◆ operator!=()

bool Argus::Tuple< N, T >::operator!= ( const Tuple< N, T > &  rhs) const
inlineinherited

Returns true if there are any differences between the two tuples.

Definition at line 548 of file Types.h.

◆ operator*()

const Tuple<N, T> Argus::Tuple< N, T >::operator* ( const T &  rhs) const
inlineinherited

Returns the result of multiplying this tuple by a single value.

Definition at line 598 of file Types.h.

◆ operator*=()

Tuple<N, T>& Argus::Tuple< N, T >::operator*= ( const T &  rhs)
inlineinherited

Multiplies every element in the tuple by a single value.

Definition at line 570 of file Types.h.

◆ operator+()

const Tuple<N, T> Argus::Tuple< N, T >::operator+ ( const Tuple< N, T > &  rhs) const
inlineinherited

Returns the result of adding another tuple to this tuple.

Definition at line 586 of file Types.h.

◆ operator+=()

Tuple<N, T>& Argus::Tuple< N, T >::operator+= ( const Tuple< N, T > &  rhs)
inlineinherited

Adds every element of another tuple to the elements of this tuple.

Definition at line 554 of file Types.h.

◆ operator-()

const Tuple<N, T> Argus::Tuple< N, T >::operator- ( const Tuple< N, T > &  rhs) const
inlineinherited

Returns the result of subtracting another tuple from this tuple.

Definition at line 592 of file Types.h.

◆ operator-=()

Tuple<N, T>& Argus::Tuple< N, T >::operator-= ( const Tuple< N, T > &  rhs)
inlineinherited

Subtracts every element of another tuple from the elements of this tuple.

Definition at line 562 of file Types.h.

◆ operator/()

const Tuple<N, T> Argus::Tuple< N, T >::operator/ ( const T &  rhs) const
inlineinherited

Returns the result of dividing this tuple by a single value.

Definition at line 604 of file Types.h.

◆ operator/=()

Tuple<N, T>& Argus::Tuple< N, T >::operator/= ( const T &  rhs)
inlineinherited

Divides every element in the tuple by a single value.

Definition at line 578 of file Types.h.

◆ operator==()

bool Argus::Tuple< N, T >::operator== ( const Tuple< N, T > &  rhs) const
inlineinherited

Returns true when every element in the two tuples are identical.

Definition at line 542 of file Types.h.

◆ operator[]() [1/2]

T& Argus::Tuple< N, T >::operator[] ( unsigned int  i)
inlineinherited

Definition at line 609 of file Types.h.

◆ operator[]() [2/2]

const T& Argus::Tuple< N, T >::operator[] ( unsigned int  i) const
inlineinherited

Definition at line 610 of file Types.h.

◆ right() [1/2]

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

◆ right() [2/2]

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

Definition at line 808 of file Types.h.

◆ top() [1/2]

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

◆ top() [2/2]

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

Definition at line 806 of file Types.h.

◆ tupleSize()

static unsigned int Argus::Tuple< N, T >::tupleSize
inlinestaticinherited

Returns the number of elements in the tuple.

Definition at line 613 of file Types.h.

◆ width()

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

Returns the width of the rectangle.

Definition at line 813 of file Types.h.

Referenced by Argus::Rectangle< uint32_t >::area().

Field Documentation

◆ m_data

T Argus::Tuple< N, T >::m_data[N]
protectedinherited

Definition at line 616 of file Types.h.


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