Module jumper.core.path

The path class.

The path class represents a path from a start location to a goal. An instance from this class would be a result of a request addressed to pathfinder:getPath. A path is basically a set of nodes, aligned in a specific order, defining a way to follow for moving agents.

Info:

  • Copyright: 2012-2013
  • License: MIT
  • Author: Roland Yonaba

Functions

path:new () Inits a new path object.
path:iter () Iterates on each single node along a path .
path:nodes () Iterates on each single node along a path .
path:getLength () Evaluates the path length
path:fill () Path filling function.
path:filter () Path compression.

Tables

path The path class


Functions

path:new ()
Inits a new path object.

Returns:

    path a path object
path:iter ()
Iterates on each single node along a path . At each step of iteration, returns a node and plus a count value. Aliased as path:nodes

Returns:

  1. node a node
  2. int the count for the number of nodes

see also:

path:nodes ()
Iterates on each single node along a path . At each step of iteration, returns a node and plus a count value. Aliased for path:iter

Returns:

  1. node a node
  2. int the count for the number of nodes

see also:

path:getLength ()
Evaluates the path length

Returns:

    number the path length
path:fill ()
Path filling function. Interpolates between non contiguous locations along a path to build a fully continuous path . This maybe useful when using Jump Point Search finder. Does the opposite of path:filter

see also:

path:filter ()
Path compression. Given a path , eliminates useless nodes to return a lighter path . Does the opposite of path:fill

see also:

Tables

path
The path class
generated by LDoc 1.3