MRPT
2.0.1
|
A smart look-up-table (LUT) of sin/cos values for 2D laser scans.
Refer to the main method CSinCosLookUpTableFor2DScans::getSinCosForScan()
This class is used in mrpt::maps::CPointsMap
Definition at line 27 of file CSinCosLookUpTableFor2DScans.h.
#include <mrpt/obs/CSinCosLookUpTableFor2DScans.h>
Classes | |
struct | TSinCosValues |
A pair of vectors with the cos and sin values. More... | |
Public Member Functions | |
CSinCosLookUpTableFor2DScans ()=default | |
CSinCosLookUpTableFor2DScans (const CSinCosLookUpTableFor2DScans &) | |
Do NOT copy neither the cache nor the mutex. More... | |
CSinCosLookUpTableFor2DScans & | operator= (const CSinCosLookUpTableFor2DScans &) |
const TSinCosValues & | getSinCosForScan (const CObservation2DRangeScan &scan) const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest. More... | |
const TSinCosValues & | getSinCosForScan (const T2DScanProperties &scan_prop) const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest. More... | |
Private Attributes | |
std::map< T2DScanProperties, TSinCosValues > | m_cache |
The cache of known scans and their sin/cos tables. More... | |
std::recursive_mutex | m_cache_mtx |
|
default |
|
inline |
Do NOT copy neither the cache nor the mutex.
Definition at line 32 of file CSinCosLookUpTableFor2DScans.h.
const CSinCosLookUpTableFor2DScans::TSinCosValues & CSinCosLookUpTableFor2DScans::getSinCosForScan | ( | const CObservation2DRangeScan & | scan | ) | const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest.
Usage:
Definition at line 24 of file CSinCosLookUpTableFor2DScans.cpp.
References mrpt::obs::CObservation2DRangeScan::getScanProperties().
Referenced by velodyne_scan_to_pointcloud().
const CSinCosLookUpTableFor2DScans::TSinCosValues & CSinCosLookUpTableFor2DScans::getSinCosForScan | ( | const T2DScanProperties & | scan_prop | ) | const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 37 of file CSinCosLookUpTableFor2DScans.cpp.
References mrpt::obs::T2DScanProperties::aperture, ASSERT_, mrpt::obs::CSinCosLookUpTableFor2DScans::TSinCosValues::ccos, mrpt::obs::CSinCosLookUpTableFor2DScans::TSinCosValues::csin, mrpt::d2f(), mrpt::lockHelper(), mrpt::obs::T2DScanProperties::nRays, mrpt::math::CVectorDynamic< T >::resize(), and mrpt::obs::T2DScanProperties::rightToLeft.
|
inline |
Definition at line 33 of file CSinCosLookUpTableFor2DScans.h.
|
mutableprivate |
The cache of known scans and their sin/cos tables.
Definition at line 64 of file CSinCosLookUpTableFor2DScans.h.
|
mutableprivate |
Definition at line 65 of file CSinCosLookUpTableFor2DScans.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |