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::slam::CPointsMap
#include <mrpt/slam/CSinCosLookUpTableFor2DScans.h>
Classes | |
| struct | TSinCosValues |
| A pair of vectors with the cos and sin values. More... | |
Public Member Functions | |
| const TSinCosValues & | getSinCosForScan (const CObservation2DRangeScan &scan) |
| 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. | |
Private Attributes | |
| std::map< T2DScanProperties, TSinCosValues > | m_cache |
| The cache of known scans and their sin/cos tables. | |
| const TSinCosValues& mrpt::slam::CSinCosLookUpTableFor2DScans::getSinCosForScan | ( | const CObservation2DRangeScan & | scan | ) |
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:
CSinCosLookUpTableFor2DScans cache;
...
const CSinCosLookUpTableFor2DScans::TSinCosValues & sincos_vals = cache.getSinCosForScan( scan );
std::map<T2DScanProperties,TSinCosValues> mrpt::slam::CSinCosLookUpTableFor2DScans::m_cache [private] |
The cache of known scans and their sin/cos tables.
Definition at line 63 of file CSinCosLookUpTableFor2DScans.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |