public class BresenhamTerrainPicker extends java.lang.Object implements TerrainPicker
| Constructor and Description |
|---|
BresenhamTerrainPicker(TerrainQuad root) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkTriangles(float gridX,
float gridY,
Ray pick,
Vector3f intersection,
TerrainPatch patch,
Triangle store) |
protected int |
findClosestHeightIndex(Vector3f position,
TerrainPatch patch)
Finds the closest height point to a position.
|
int |
getTerrainIntersection(Ray worldPick,
CollisionResults results)
Ask for the point of intersection between the given ray and the terrain.
|
protected boolean |
getTriangles(float gridX,
float gridY,
TerrainPatch patch)
Request the triangles (in world coord space) of a TerrainBlock that
correspond to the given grid location.
|
boolean |
isSupportingMultipleCollisions() |
void |
setSupportMultipleCollisions(boolean multipleCollisions) |
public BresenhamTerrainPicker(TerrainQuad root)
public void setSupportMultipleCollisions(boolean multipleCollisions)
public boolean isSupportingMultipleCollisions()
public int getTerrainIntersection(Ray worldPick, CollisionResults results)
TerrainPickergetTerrainIntersection in interface TerrainPickerworldPick - our pick ray, in world space.protected boolean checkTriangles(float gridX,
float gridY,
Ray pick,
Vector3f intersection,
TerrainPatch patch,
Triangle store)
protected boolean getTriangles(float gridX,
float gridY,
TerrainPatch patch)
gridX - grid rowgridY - grid columnpatch - the TerrainPatch we are working withprotected int findClosestHeightIndex(Vector3f position, TerrainPatch patch)
position - the position to check atpatch - the patch to get height values from