#include <fitness.hpp>
Public Member Functions | |
Grid () | |
Construct an empty grid. | |
void | setupGrid (const Vec3_t &p1, const Vec3_t &p2, Float_t spacing, unsigned int typecount, Float_t outside) |
setup the position and size of the grid. | |
void | calculate (unsigned int type, boost::function< Float_t(Vec3_t)> &calc) |
fill a grid with precalculated values. | |
bool | iscalculated (unsigned int type) |
check if there are allready values in the grid for this type. | |
Float_t | interpolate (const Vec3_t &p, unsigned int type) |
trilinear interpolation. |
void paradocks::Grid::setupGrid | ( | const Vec3_t & | p1, | |
const Vec3_t & | p2, | |||
Float_t | spacing, | |||
unsigned int | typecount, | |||
Float_t | outside | |||
) |
setup the position and size of the grid.
p1 | point defining one corner of the grid box. | |
p2 | point defining another corner of the grid box. | |
spacing | lattice spacing. | |
typecount | number of grids. | |
outside | function value for all points outside the grid. |
void paradocks::Grid::calculate | ( | unsigned int | type, | |
boost::function< Float_t(Vec3_t)> & | calc | |||
) |
fill a grid with precalculated values.
type | the type which should be calculated. | |
calc | callback to the evaluation function. |
bool paradocks::Grid::iscalculated | ( | unsigned int | type | ) |
check if there are allready values in the grid for this type.
type | type. |
Float_t paradocks::Grid::interpolate | ( | const Vec3_t & | p, | |
unsigned int | type | |||
) |
trilinear interpolation.
p | position. | |
type | type. |