|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.path.SearchGrid
public class SearchGrid
This class represents the grid that contains the walkable area of a scene. The grid is a two-dimensional plane in the XZ plane. It's center is located at the worlds origin (0f,0f,0f).
| Constructor Summary | |
|---|---|
SearchGrid(int sceneWidth,
int sceneLength,
int gridNodeSize)
Creates a new search grid out of the specified walkable area image |
|
| Method Summary | |
|---|---|
void |
draw(javax.media.opengl.GL gl)
This method draws the search grid in the XZ plane at the height of -0.1 |
GridNode |
getGridNode(float x,
float z)
Returns the grid node at the specified coordinates. |
GridNode |
getGridNode(int id)
Returns the grid node by its id. |
GridNode[][] |
getGridNodes()
Returns the 2 dimensional array of grid nodes representing the search grid. |
int |
getGridNodeSize()
Returns the size of a grid node square |
java.util.List<GridNode> |
getGridNodesList()
Returns a list representation of the grid nodes in the search grid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchGrid(int sceneWidth,
int sceneLength,
int gridNodeSize)
sceneWidth - width of the scene (must be a power of 2)sceneLength - length of the scene (must be a power of 2)gridNodeSize - width and length for the square of a grid node (must
be a power of 2)| Method Detail |
|---|
public int getGridNodeSize()
public GridNode[][] getGridNodes()
public java.util.List<GridNode> getGridNodesList()
public GridNode getGridNode(float x,
float z)
null.
x - x coordinatez - z coordinate
public GridNode getGridNode(int id)
null.
id - id of the seeked grid node
public void draw(javax.media.opengl.GL gl)
gl -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||