|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
TTile
- type of tile used.public interface PathBasedMap<TTile extends AbstractPathTile>
Describe a tile based map which supports pathfinding. The setRef/getRef functions allows to store special id. Theses id can represent an entry which is over the map. This way, it is realy easy and fast to search an entry at specified location.
Method Summary | |
---|---|
boolean |
blocked(Pathfindable mover,
int v,
int h,
boolean ignoreRef)
Check if current location is blocking or not. |
boolean |
checkFreePlace(int tx,
int ty,
int w,
int h,
int id)
Check if area if unused. |
java.util.List<Point2D> |
getAllFreePlaceArround(int tx,
int ty,
int w,
int h,
int id,
int radius)
Search list of free area from this area. |
float |
getCost(Pathfindable mover,
int sx,
int sy,
int tx,
int ty)
Get the cost of the complete path, from start till end. |
Point2D |
getFreePlaceArround(int tx,
int ty,
int w,
int h,
int id,
int radius)
Search a free area from this area. |
int |
getRef(int v,
int h)
Get ref id. |
TTile |
getTileArround(Pathfindable mover,
int v,
int h,
int width,
int height)
Search the first unblocking tile arround location (clock way). |
void |
pathFinderVisited(int v,
int h)
Mark the tile as visited. |
void |
setRef(int v,
int h,
int id)
Set ref id. |
Methods inherited from interface com.b3dgs.lionengine.game.map.TileBasedMap |
---|
getHeightInTiles, getPatternsNumber, getTile, getTileHeight, getTileWidth, getWidthInTiles, renderTile |
Method Detail |
---|
void pathFinderVisited(int v, int h)
v
- vertical location.h
- horizontal location.TTile getTileArround(Pathfindable mover, int v, int h, int width, int height)
mover
- object searching path.v
- vertical location.h
- horizontal location.width
- number of horizontal tiles to search.height
- number of vertical tiles to search.
Point2D getFreePlaceArround(int tx, int ty, int w, int h, int id, int radius)
tx
- horizontal location.ty
- vertical location.w
- width in tile.h
- height in tile.id
- id to ignore.radius
- search size.
java.util.List<Point2D> getAllFreePlaceArround(int tx, int ty, int w, int h, int id, int radius)
tx
- horizontal location.ty
- vertical location.w
- width in tile.h
- height in tile.id
- id to ignore.radius
- search size.
boolean checkFreePlace(int tx, int ty, int w, int h, int id)
tx
- horizontal location.ty
- vertical location.w
- width in tile.h
- height in tile.id
- id to ignore.
boolean blocked(Pathfindable mover, int v, int h, boolean ignoreRef)
mover
- object moving on map.v
- vertical location.h
- horizontal location.ignoreRef
- ignore map ref array checking.
float getCost(Pathfindable mover, int sx, int sy, int tx, int ty)
mover
- object moving on map.sx
- starting location x.sy
- starting location y.tx
- ending location x.ty
- ending location y.
void setRef(int v, int h, int id)
v
- vertical index.h
- horizontal index.id
- id to store.int getRef(int v, int h)
v
- vertical index.h
- horizontal index.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |