Apollo  6.0
Open source self driving car software
Public Member Functions | Public Attributes | Friends | List of all members
apollo::perception::base::Rect< T > Struct Template Reference

#include <box.h>

Collaboration diagram for apollo::perception::base::Rect< T >:
Collaboration graph

Public Member Functions

 Rect ()
 
 Rect (const T &x_in, const T &y_in, const T &width_in, const T &height_in)
 
 Rect (const BBox2D< T > &bbox)
 
Rect< T > & operator= (const BBox2D< T > &bbox)
 
Point2D< T > Center () const
 
void SetCenter (Point2D< T > p)
 
Area () const
 
std::string ToStr () const
 

Public Attributes

x = 0
 
y = 0
 
width = 0
 
height = 0
 

Friends

Rect< T > operator & (const Rect< T > &rect1, const Rect< T > &rect2)
 
Rect< T > operator| (const Rect< T > &rect1, const Rect< T > &rect2)
 
bool operator== (const Rect &rect1, const Rect &rect2)
 
bool operator!= (const Rect &rect1, const Rect &rect2)
 

Constructor & Destructor Documentation

◆ Rect() [1/3]

template<typename T>
apollo::perception::base::Rect< T >::Rect ( )
inline

◆ Rect() [2/3]

template<typename T>
apollo::perception::base::Rect< T >::Rect ( const T &  x_in,
const T &  y_in,
const T &  width_in,
const T &  height_in 
)
inline

◆ Rect() [3/3]

template<typename T>
apollo::perception::base::Rect< T >::Rect ( const BBox2D< T > &  bbox)
inlineexplicit

Member Function Documentation

◆ Area()

template<typename T>
T apollo::perception::base::Rect< T >::Area ( ) const
inline

◆ Center()

template<typename T>
Point2D<T> apollo::perception::base::Rect< T >::Center ( ) const
inline

◆ operator=()

template<typename T>
Rect<T>& apollo::perception::base::Rect< T >::operator= ( const BBox2D< T > &  bbox)
inline

◆ SetCenter()

template<typename T>
void apollo::perception::base::Rect< T >::SetCenter ( Point2D< T >  p)
inline

◆ ToStr()

template<typename T>
std::string apollo::perception::base::Rect< T >::ToStr ( ) const
inline

Friends And Related Function Documentation

◆ operator &

template<typename T>
Rect<T> operator& ( const Rect< T > &  rect1,
const Rect< T > &  rect2 
)
friend

◆ operator!=

template<typename T>
bool operator!= ( const Rect< T > &  rect1,
const Rect< T > &  rect2 
)
friend

◆ operator==

template<typename T>
bool operator== ( const Rect< T > &  rect1,
const Rect< T > &  rect2 
)
friend

◆ operator|

template<typename T>
Rect<T> operator| ( const Rect< T > &  rect1,
const Rect< T > &  rect2 
)
friend

Member Data Documentation

◆ height

template<typename T>
T apollo::perception::base::Rect< T >::height = 0

◆ width

template<typename T>
T apollo::perception::base::Rect< T >::width = 0

◆ x

template<typename T>
T apollo::perception::base::Rect< T >::x = 0

◆ y

template<typename T>
T apollo::perception::base::Rect< T >::y = 0

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