Apollo 11.0
自动驾驶开放平台
apollo::perception::lidar::GroundGrid类 参考

#include <ground_struct.h>

apollo::perception::lidar::GroundGrid 的协作图:

Public 成员函数

 GroundGrid ()=default
 
 ~GroundGrid ()=default
 
 GroundGrid (const GroundGrid &rhs)
 
GroundGrid & operator= (const GroundGrid &rhs)
 
void Init (int32_t rows, int32_t cols)
 
void Reset ()
 
bool IsInGrid (int32_t r, int32_t c)
 
GroundNode * operator[] (int32_t r)
 
const GroundNode * operator[] (int32_t r) const
 
GroundNode * DataPtr ()
 
const GroundNode * DataPtr () const
 
int32_t rows () const
 
int32_t cols () const
 
int32_t size () const
 

Protected 属性

std::vector< GroundNode > data_
 
std::vector< GroundNode * > nodes_
 
int32_t rows_ = 0
 
int32_t cols_ = 0
 
int32_t size_ = 0
 

详细描述

在文件 ground_struct.h 第 33 行定义.

构造及析构函数说明

◆ GroundGrid() [1/2]

apollo::perception::lidar::GroundGrid::GroundGrid ( )
default

◆ ~GroundGrid()

apollo::perception::lidar::GroundGrid::~GroundGrid ( )
default

◆ GroundGrid() [2/2]

apollo::perception::lidar::GroundGrid::GroundGrid ( const GroundGrid &  rhs)
inline

在文件 ground_struct.h 第 37 行定义.

37{ *this = rhs; }

成员函数说明

◆ cols()

int32_t apollo::perception::lidar::GroundGrid::cols ( ) const
inline

在文件 ground_struct.h 第 94 行定义.

◆ DataPtr() [1/2]

GroundNode * apollo::perception::lidar::GroundGrid::DataPtr ( )
inline

在文件 ground_struct.h 第 85 行定义.

85{ return data_.data(); }
std::vector< GroundNode > data_

◆ DataPtr() [2/2]

const GroundNode * apollo::perception::lidar::GroundGrid::DataPtr ( ) const
inline

在文件 ground_struct.h 第 88 行定义.

88{ return data_.data(); }

◆ Init()

void apollo::perception::lidar::GroundGrid::Init ( int32_t  rows,
int32_t  cols 
)
inline

在文件 ground_struct.h 第 54 行定义.

54 {
55 data_.clear();
56 nodes_.clear();
57 rows_ = rows;
58 cols_ = cols;
59 size_ = rows_ * cols_;
60 data_.resize(size_);
61 nodes_.resize(rows_);
62 for (int i = 0; i < rows_; ++i) {
63 nodes_[i] = data_.data() + i * cols_;
64 }
65 Reset();
66 }
std::vector< GroundNode * > nodes_

◆ IsInGrid()

bool apollo::perception::lidar::GroundGrid::IsInGrid ( int32_t  r,
int32_t  c 
)
inline

在文件 ground_struct.h 第 72 行定义.

72 {
73 return (r >= 0 && r < rows_ && c >= 0 && c < cols_);
74 }

◆ operator=()

GroundGrid & apollo::perception::lidar::GroundGrid::operator= ( const GroundGrid &  rhs)
inline

在文件 ground_struct.h 第 38 行定义.

38 {
39 rows_ = rhs.rows_;
40 cols_ = rhs.cols_;
41 size_ = rhs.size_;
42 if (data_.size() != rhs.data_.size()) {
43 data_.resize(rhs.data_.size());
44 }
45 memcpy(data_.data(), rhs.data_.data(), sizeof(GroundNode) * size_);
46 nodes_.resize(rows_);
47 for (int32_t i = 0; i < rows_; ++i) {
48 nodes_[i] = data_.data() + i * cols_;
49 }
50 return *this;
51 }

◆ operator[]() [1/2]

GroundNode * apollo::perception::lidar::GroundGrid::operator[] ( int32_t  r)
inline

在文件 ground_struct.h 第 78 行定义.

78{ return nodes_[r]; }

◆ operator[]() [2/2]

const GroundNode * apollo::perception::lidar::GroundGrid::operator[] ( int32_t  r) const
inline

在文件 ground_struct.h 第 82 行定义.

82{ return nodes_[r]; }

◆ Reset()

void apollo::perception::lidar::GroundGrid::Reset ( )
inline

在文件 ground_struct.h 第 68 行定义.

68{ memset(data_.data(), 0, sizeof(GroundNode) * data_.size()); }

◆ rows()

int32_t apollo::perception::lidar::GroundGrid::rows ( ) const
inline

在文件 ground_struct.h 第 91 行定义.

91{ return rows_; }

◆ size()

int32_t apollo::perception::lidar::GroundGrid::size ( ) const
inline

在文件 ground_struct.h 第 97 行定义.

97{ return size_; }

类成员变量说明

◆ cols_

int32_t apollo::perception::lidar::GroundGrid::cols_ = 0
protected

在文件 ground_struct.h 第 103 行定义.

◆ data_

std::vector<GroundNode> apollo::perception::lidar::GroundGrid::data_
protected

在文件 ground_struct.h 第 100 行定义.

◆ nodes_

std::vector<GroundNode*> apollo::perception::lidar::GroundGrid::nodes_
protected

在文件 ground_struct.h 第 101 行定义.

◆ rows_

int32_t apollo::perception::lidar::GroundGrid::rows_ = 0
protected

在文件 ground_struct.h 第 102 行定义.

◆ size_

int32_t apollo::perception::lidar::GroundGrid::size_ = 0
protected

在文件 ground_struct.h 第 104 行定义.


该类的文档由以下文件生成: