Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Classes | Public Member Functions | Private Attributes
mrpt::obs::CSinCosLookUpTableFor2DScans Class Reference

Detailed Description

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 31 of file obs/CSinCosLookUpTableFor2DScans.h.

#include <mrpt/obs/CSinCosLookUpTableFor2DScans.h>

Classes

struct  TSinCosValues
 A pair of vectors with the cos and sin values. More...
 

Public Member Functions

const TSinCosValuesgetSinCosForScan (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 TSinCosValuesgetSinCosForScan (const T2DScanProperties &scan_prop) const
 

Private Attributes

std::map< T2DScanProperties, TSinCosValuesm_cache
 The cache of known scans and their sin/cos tables. More...
 

Member Function Documentation

const TSinCosValues& mrpt::obs::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:

CSinCosLookUpTableFor2DScans cache;
...
const CSinCosLookUpTableFor2DScans::TSinCosValues & sincos_vals = cache.getSinCosForScan( scan );
const TSinCosValues& mrpt::obs::CSinCosLookUpTableFor2DScans::getSinCosForScan ( const T2DScanProperties scan_prop) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Data Documentation

std::map<T2DScanProperties,TSinCosValues> mrpt::obs::CSinCosLookUpTableFor2DScans::m_cache
mutableprivate

The cache of known scans and their sin/cos tables.

Definition at line 53 of file obs/CSinCosLookUpTableFor2DScans.h.




Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN:Unversioned directory at Mon May 30 18:20:32 UTC 2016