Cost function object relying on a Lua function. More...
#include <lua_pathfind_cost_calculator.hpp>
Public Member Functions | |
lua_pathfind_cost_calculator (lua_State *L_, int i) | |
double | cost (const map_location &loc, const double so_far) const |
Public Member Functions inherited from pathfind::cost_calculator | |
cost_calculator () | |
virtual | ~cost_calculator () |
Public Attributes | |
lua_State * | L |
int | index |
Additional Inherited Members | |
Static Public Member Functions inherited from pathfind::cost_calculator | |
static double | getNoPathValue () |
Cost function object relying on a Lua function.
Definition at line 25 of file lua_pathfind_cost_calculator.hpp.
|
inline |
L_ | the pointer to the lua interpreter. |
i | the stack position of the lua function to calculate the cost. |
Definition at line 33 of file lua_pathfind_cost_calculator.hpp.
|
inlinevirtual |
Implements pathfind::cost_calculator.
Definition at line 34 of file lua_pathfind_cost_calculator.hpp.
References index, L, loc, luaW_pcall(), map_location::wml_x(), and map_location::wml_y().
int lua_pathfind_cost_calculator::index |
Definition at line 28 of file lua_pathfind_cost_calculator.hpp.
Referenced by cost().
lua_State* lua_pathfind_cost_calculator::L |
Definition at line 27 of file lua_pathfind_cost_calculator.hpp.
Referenced by cost().