paradocks::Grid Class Reference
[ParaDockS Fitness function Interface]

Grid class. This class can be used to aproximate the energie value within a grid by linear triangulation. More...

#include <fitness.hpp>

List of all members.

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.


Detailed Description

Grid class. This class can be used to aproximate the energie value within a grid by linear triangulation.

Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
type type.
Returns:
true if the grid of this type is not empty.

Float_t paradocks::Grid::interpolate ( const Vec3_t &  p,
unsigned int  type 
)

trilinear interpolation.

Parameters:
p position.
type type.
Returns:
interpolated value.


The documentation for this class was generated from the following file:

Generated on Mon Nov 23 08:31:44 2009 for ParaDockS by  doxygen 1.5.8