Apollo 10.0
自动驾驶开放平台
apollo::perception::base::BBox2D< T > 模板结构体 参考

#include <box.h>

apollo::perception::base::BBox2D< T > 的协作图:

Public 成员函数

 BBox2D ()
 
 BBox2D (const T &xmin_in, const T &ymin_in, const T &xmax_in, const T &ymax_in)
 
 BBox2D (const Rect< T > &rect)
 
BBox2D< T > & operator= (const Rect< T > &rect)
 
Point2D< T > Center () const
 
Area () const
 

Public 属性

xmin = 0
 
ymin = 0
 
xmax = 0
 
ymax = 0
 

详细描述

template<typename T>
struct apollo::perception::base::BBox2D< T >

在文件 box.h124 行定义.

构造及析构函数说明

◆ BBox2D() [1/3]

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

◆ BBox2D() [2/3]

template<typename T >
apollo::perception::base::BBox2D< T >::BBox2D ( const T &  xmin_in,
const T &  ymin_in,
const T &  xmax_in,
const T &  ymax_in 
)
inline

在文件 box.h127 行定义.

128 : xmin(xmin_in), ymin(ymin_in), xmax(xmax_in), ymax(ymax_in) {}

◆ BBox2D() [3/3]

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

在文件 box.h130 行定义.

130 {
131 this->xmin = rect.x;
132 this->ymin = rect.y;
133 this->xmax = rect.x + rect.width;
134 this->ymax = rect.y + rect.height;
135 }

成员函数说明

◆ Area()

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

在文件 box.h152 行定义.

152{ return (xmax - xmin) * (ymax - ymin); }

◆ Center()

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

在文件 box.h145 行定义.

145 {
146 Point2D<T> p;
147 p.x = this->xmin + (this->xmax - this->xmin) / 2;
148 p.y = this->ymin + (this->ymax - this->ymin) / 2;
149 return p;
150 }

◆ operator=()

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

在文件 box.h137 行定义.

137 {
138 this->xmin = rect.x;
139 this->ymin = rect.y;
140 this->xmax = rect.x + rect.width;
141 this->ymax = rect.y + rect.height;
142 return *this;
143 }

类成员变量说明

◆ xmax

template<typename T >
T apollo::perception::base::BBox2D< T >::xmax = 0

在文件 box.h155 行定义.

◆ xmin

template<typename T >
T apollo::perception::base::BBox2D< T >::xmin = 0

在文件 box.h153 行定义.

◆ ymax

template<typename T >
T apollo::perception::base::BBox2D< T >::ymax = 0

在文件 box.h156 行定义.

◆ ymin

template<typename T >
T apollo::perception::base::BBox2D< T >::ymin = 0

在文件 box.h154 行定义.


该结构体的文档由以下文件生成: