PathBuilder

indigoextras.pathfinding.PathBuilder
See thePathBuilder companion trait
object PathBuilder

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object Movements

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Movements.type

Value members

Concrete methods

def buildPointNeighbours(allowedMovements: Batch[Point], pointsFilter: Point => Boolean): Point => Batch[Point]

Builds a function that returns the neighbours of a point from a list of allowed movements and a filter on the generated points

Builds a function that returns the neighbours of a point from a list of allowed movements and a filter on the generated points

Value parameters

allowedMovements

the allowed movements

pointsFilter

a filter on the generated points (e.g. to filter impassable points, or points outside the grid)

Attributes

Returns

a function that returns the neighbours of a point

def fromAllowedPoints(allowedPoints: Set[Point], allowedMovements: Batch[Point], directSideCost: Int, diagonalCost: Int, maxHeuristicFactor: Int): PathBuilder[Point]

Builds a path finder builder from a set of allowed points

Builds a path finder builder from a set of allowed points

Value parameters

allowedMovements

the allowed movements

allowedPoints

the set of allowed points

diagonalCost

the cost of a diagonal movement

directSideCost

the cost of a direct side movement

maxHeuristicFactor

the maximum heuristic factor

Attributes

Returns

a path finder builder

def fromAllowedPoints(allowedPoints: Set[Point]): PathBuilder[Point]
def fromImpassablePoints(impassablePoints: Set[Point], width: Int, height: Int, allowedMovements: Batch[Point], directSideCost: Int, diagonalCost: Int, maxHeuristicFactor: Int): PathBuilder[Point]

Builds a path finder builder from a set of impassable points

Builds a path finder builder from a set of impassable points

Value parameters

allowedMovements

the allowed movements

diagonalCost

the cost of a diagonal movement

directSideCost

the cost of a direct side movement

height

the height of the grid

impassablePoints

the set of impassable points

maxHeuristicFactor

the maximum heuristic factor

width

the width of the grid

Attributes

Returns

a path finder builder

def fromImpassablePoints(impassablePoints: Set[Point], width: Int, height: Int): PathBuilder[Point]
def fromWeighted2DGrid(grid: Array[Array[Int]], width: Int, height: Int, allowedMovements: Batch[Point], directSideCost: Int, diagonalCost: Int, maxHeuristicFactor: Int): PathBuilder[Point]

Builds a path finder builder from a weighted 2D grid. Impassable points are represented by Int.MaxValue other points are represented by their weight/ cost grid(y)(x) is the weight of the point (x, y)

Builds a path finder builder from a weighted 2D grid. Impassable points are represented by Int.MaxValue other points are represented by their weight/ cost grid(y)(x) is the weight of the point (x, y)

Value parameters

allowedMovements

the allowed movements

diagonalCost

the cost of a diagonal movement

directSideCost

the cost of a direct side movement

grid

the weighted 2D grid

height

the height of the grid

maxHeuristicFactor

the maximum heuristic factor

width

the width of the grid

Attributes

Returns

a path finder builder

def fromWeighted2DGrid(grid: Array[Array[Int]], width: Int, height: Int): PathBuilder[Point]
def fromWeightedGrid(grid: Batch[Int], width: Int, height: Int, allowedMovements: Batch[Point], directSideCost: Int, diagonalCost: Int, maxHeuristicFactor: Int): PathBuilder[Point]

Builds a path finder builder from a weighted 1D grid. Impassable points are represented by Int.MaxValue other points are represented by their weight/ cost grid(y * width + x) is the weight of the point (x, y)

Builds a path finder builder from a weighted 1D grid. Impassable points are represented by Int.MaxValue other points are represented by their weight/ cost grid(y * width + x) is the weight of the point (x, y)

Value parameters

allowedMovements

the allowed movements

diagonalCost

the cost of a diagonal movement

directSideCost

the cost of a direct side movement

grid

the weighted 1D grid

height

the height of the grid

maxHeuristicFactor

the maximum heuristic factor

width

the width of the grid

Attributes

Returns

a path finder builder

def fromWeightedGrid(grid: Batch[Int], width: Int, height: Int): PathBuilder[Point]

Concrete fields

val DefaultSideCost: Int