29 #ifndef __GridMapCacheArray_h_ 30 #define __GridMapCacheArray_h_ 53 , arrayDimensions(-1,-1)
84 if (elem.
index == currCacheIndex) {
100 elem.
index = currCacheIndex;
110 setArraySize(newDimensions);
121 arrayDimensions = newDimensions;
123 int sizeX = arrayDimensions[0];
124 int sizeY = arrayDimensions[1];
126 int size = sizeX * sizeY;
130 for (
int x = 0;
x < size; ++
x) {
148 if (this->arrayDimensions != newDimensions) {
149 if (cacheArray != 0) {
153 createCacheArray(newDimensions);
bool containsCachedData(int index, float &val)
Eigen::Vector2i arrayDimensions
The size of the array.
int currCacheIndex
The cache iteration index value.
TFSIMD_FORCE_INLINE const tfScalar & x() const
void setArraySize(const Eigen::Vector2i &newDimensions)
void cacheData(int index, float val)
void setMapSize(const Eigen::Vector2i &newDimensions)
void createCacheArray(const Eigen::Vector2i &newDimensions)
CachedMapElement * cacheArray
Array used for caching data.