#include <LUT.h>
Public Methods | |
| WRAP< N, T > & | operator[] (T x) |
| Specify another coordinate. | |
| operator T () const | |
| Coerce the return value. | |
Friends | |
| class | LUT< N, T > |
Helper class templates for improved syntax when accessing tables. LUT::operator[] returns a WRAP object which can be further dereferenced with operator[]. When N coordinates have been specified, WRAP queries the LUT to get the interpolated value. WRAP defines (operator T) to act as a variable of type T to return this value. In practice, here's what it looks like:
LUT<3,float> table; ... float x = table[10.2][3.3][1.4];
Here table[10.2] returns a WRAP<3,float>. The next two dereferences build up the internal VEC<3, float>, finally calling table.getValue(). The righthand-side expression is still a WRAP<3, float> at this point, but is implicitly coerced to a float to assign the interpolated value to 'x'.
|
|||||||||
|
Coerce the return value.
|
|
||||||||||
|
Specify another coordinate.
|
|
|||||
|
|
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:42 2003, using Doxygen 1.2.18. |