51 virtual bool calculatePotentials(
unsigned char* costs,
double start_x,
double start_y,
double end_x,
double end_y,
52 int cycles,
float* potential) = 0;
77 void clearEndpoint(
unsigned char* costs,
float* potential,
int gx,
int gy,
int s){
78 int startCell =
toIndex(gx, gy);
79 for(
int i=-s;i<=s;i++){
80 for(
int j=-s;j<=s;j++){
81 int n = startCell+i+
nx_*j;
virtual float calculatePotential(float *potential, unsigned char cost, int n, float prev_potential=-1)
void setLethalCost(unsigned char lethal_cost)
virtual void setSize(int nx, int ny)
Sets or resets the size of the map.
unsigned char lethal_cost_
void clearEndpoint(unsigned char *costs, float *potential, int gx, int gy, int s)
int toIndex(int x, int y)
unsigned char neutral_cost_
Expander(PotentialCalculator *p_calc, int nx, int ny)
PotentialCalculator * p_calc_
void setHasUnknown(bool unknown)
virtual bool calculatePotentials(unsigned char *costs, double start_x, double start_y, double end_x, double end_y, int cycles, float *potential)=0
void setNeutralCost(unsigned char neutral_cost)
void setFactor(float factor)