22 return lhs.
x==rhs.
x && lhs.
y==rhs.
y;
65using table3d_bin_t = _table2d_detail::Bin<table3d_axis_t>;
70 const table3d_bin_t &xBin,
71 const uint16_t xMultiplier,
72 const table3d_bin_t &yBin,
73 const uint16_t yMultiplier);
118template <u
int16_t xFactor, u
int16_t yFactor,
typename TValues,
typename TXAxis,
typename TYAxis>
120 const TValues &values,
125#if !defined(UNIT_TEST)
134 constexpr table3d_dim_t axisSize = std::tuple_size<TXAxis>::value;
137 auto xBin = _table2d_detail::findCachedBin(pValueCache->
lastBinMax.
x, std::begin(xAxis), std::end(xAxis), (
table3d_dim_t)div_round_closest_u16<xFactor>(lookupValues.
x));
138 auto yBin = _table2d_detail::findCachedBin(pValueCache->
lastBinMax.
y, std::begin(yAxis), std::end(yAxis), (
table3d_dim_t)div_round_closest_u16<yFactor>(lookupValues.
y));
uint8_t table3d_value_t
The type of each table value.
Definition table3d_typedefs.h:25
uint8_t table3d_dim_t
Encodes the length of the axes.
Definition table3d_typedefs.h:22
constexpr uint16_t yFactor
Definition table3d.h:109
Row and column coordinates in a 2D table.
Definition table3d_interpolate.h:152
table3d_dim_t row
Definition table3d_interpolate.h:153
table3d_dim_t col
Definition table3d_interpolate.h:154
Cache structure for 3D table value lookups.
Definition table3d_interpolate.h:36
xy_pair_t last_lookup
Definition table3d_interpolate.h:53
xy_coord2d lastBinMax
Definition table3d_interpolate.h:50
table3d_value_t lastOutput
Definition table3d_interpolate.h:54
2D coordinate structure for table lookups
Definition table3d_interpolate.h:28
table3d_dim_t y
Y axis coordinate.
Definition table3d_interpolate.h:32
table3d_dim_t x
X axis coordinate.
Definition table3d_interpolate.h:30
A pair of x and y values used for lookups in 3D tables.
Definition table3d_interpolate.h:15
friend bool operator==(const xy_pair_t &lhs, const xy_pair_t &rhs)
Equality operator for xy_pair_t.
Definition table3d_interpolate.h:20
uint16_t y
Definition table3d_interpolate.h:17
uint16_t x
Definition table3d_interpolate.h:16
table3d_value_t interpolate_3d_value(const xy_pair_t &lookUpValues, const table3d_dim_t &axisSize, const table3d_value_t *pValues, const table3d_bin_t &xBin, const uint16_t xMultiplier, const table3d_bin_t &yBin, const uint16_t yMultiplier)
Interpolate a table value from axis bins & values.
Definition table3d_interpolate.cpp:162
table3d_value_t get3DTableValue(struct table3DGetValueCache *pValueCache, const TValues &values, const TXAxis &xAxis, const TYAxis &yAxis, const xy_pair_t &lookupValues)
Get a value from a 3D table using the specified lookup values.
Definition table3d_interpolate.h:119
static void invalidate_cache(table3DGetValueCache *pCache)
Invalidate the cache by resetting the last lookup values.
Definition table3d_interpolate.h:58
Typedefs for primitive 3D table elements.