52#define TO_TYPE_KEY(size, xDom, yDom) table3d ## size ## xDom ## yDom ## _key
72 #define TABLE3D_GEN_TYPEKEY(size, xDom, yDom) TO_TYPE_KEY(size, xDom, yDom),
83#define TABLE3D_GEN_TYPE_INNER(size, xDom, yDom, typeName) \
85 struct typeName : public table3d_t \
88 static constexpr TableType type_key = TableType::TO_TYPE_KEY(size, xDom, yDom); \
89 static constexpr AxisDomain XDomain = AxisDomain::xDom; \
90 static constexpr AxisDomain YDomain = AxisDomain::yDom; \
92 mutable table3DGetValueCache get_value_cache; \
93 std::array<table3d_axis_t, (size)*(size)> values; \
94 std::array<table3d_axis_t, (size)> axisX; \
95 std::array<table3d_axis_t, (size)> axisY; \
97#define TABLE3D_GEN_TYPE(size, xDom, yDom) TABLE3D_GEN_TYPE_INNER(size, xDom, yDom, TABLE3D_TYPENAME_BASE(size, xDom, yDom))
105template <
typename TTable>
const uint16_t y
Definition table3d.h:106
return get3DTableValue< xFactor, yFactor >(&pTable->get_value_cache, pTable->values, pTable->axisX, pTable->axisY, { x, y })
#define TABLE3D_GEN_TYPE(size, xDom, yDom)
Definition table3d.h:97
TableType
Table type identifiers. Limited compile time RTTI.
Definition table3d.h:69
static constexpr uint16_t getConversionFactor(AxisDomain domain)
Definition table3d_axes.h:24
uint8_t table3d_value_t
The type of each table value.
Definition table3d_typedefs.h:25
constexpr uint16_t yFactor
Definition table3d.h:109
#define TABLE3D_GENERATOR(GENERATOR,...)
Core 3d table generation macro.
Definition table3d_typedefs.h:36
static uint8_t x
Definition maths.cpp:10
Workaround when min() & max() are defined as macros, which generates compile errors in most C++ stand...
3D table axis types and iterators
Functions for interpolating values from 3D tables.
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