new DistanceMap(width, height, distance_map_divisor)
manages the underlying distance map
Parameters:
Name | Type | Description |
---|---|---|
width |
number | width of the map |
height |
number | height of the map |
distance_map_divisor |
number | resolution of velocity map = 1/distance_map_divisor |
- Source:
Methods
getDistanceMapDivisor() → {number}
- Source:
Returns:
the distancemap divisor
- Type
- number
getDistanceMapEntry(x, y) → {DistMapEntry}
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
- Source:
Returns:
returns DistanceMapEntry or null if out of map
- Type
- DistMapEntry
initDistanceMap()
inits the Distancemap
- Source:
resetDistanceMap()
reinits the distancemap
- Source:
setDistanceMapValue(x, y, value)
set a map point to 1 (occupied) or 0 (free)
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
value |
number | 1 (occupied) or 0 (free) |
- Source: