atavism.server.pathing.detour
Class NavMeshQuery
java.lang.Object
atavism.server.pathing.detour.NavMeshQuery
public class NavMeshQuery
- extends java.lang.Object
Provides the ability to perform pathfinding related queries against a
navigation mesh.
For methods that support undersized buffers, if the buffer is too small to
hold the entire result set the return status of the method will include the
BUFFER_TOO_SMALL flag.
Constant member functions can be used by multiple clients without side
effects. (E.g. No change to the closed list. No impact on an in-progress
sliced path query. Etc.)
Walls and portals: A wall is a polygon segment that is considered impassable.
A portal is a passable segment between polygons. A portal may be treated as a
wall based on the QueryFilter used for a query.
Method Summary |
DetourStatusReturn |
ClosestPointOnPoly(long refId,
float[] pos,
float[] closest,
boolean posOverPoly)
|
java.util.EnumSet<Status> |
ClosestPointOnPolyBoundary(long refId,
float[] pos,
float[] closest)
|
DetourStatusReturn |
FinalizeSlicedFindPath(long[] path,
int maxPath)
|
DetourStatusReturn |
FinalizeSlicedFindPathPartial(long[] existing,
int existingSize,
long[] path,
int maxPath)
|
DetourNumericReturn |
FindDistanceToWall(long startRef,
float[] centerPos,
float maxRadius,
QueryFilter filter,
float hitDist,
float[] hitPos,
float[] hitNormal)
|
DetourStatusReturn |
FindLocalNeighbourhood(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
int maxResult)
|
DetourNumericReturn |
FindNearestPoly(float[] center,
float[] extents,
QueryFilter filter,
float[] nearestPt)
Finds the nearest Poly to the specified center position within the extents provided. |
DetourStatusReturn |
FindPath(long startRef,
long endRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long[] path,
int maxPath)
|
DetourStatusReturn |
FindPolysAroundCircle(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
float[] resultCost,
int maxResult)
|
DetourStatusReturn |
FindPolysAroundShape(long startRef,
float[] verts,
int nverts,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
float[] resultCost,
int maxResult)
|
DetourNumericReturn |
FindRandomPoint(QueryFilter filter,
java.util.Random func,
long randomRef,
float[] randomPt)
|
DetourNumericReturn |
FindRandomPointAroundCircle(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
java.util.Random frand,
long randomRef,
float[] randomPt)
|
DetourStatusReturn |
FindStraightPath(float[] startPos,
float[] endPos,
long[] path,
int pathSize,
float[] straightPath,
short[] straightPathFlags,
long[] straightPathRefs,
int maxStraightPath)
|
DetourStatusReturn |
FindStraightPath(float[] startPos,
float[] endPos,
long[] path,
int pathSize,
float[] straightPath,
short[] straightPathFlags,
long[] straightPathRefs,
int maxStraightPath,
int options)
|
DetourNumericReturn |
GetPolyHeight(long refId,
float[] pos)
|
DetourStatusReturn |
GetPolyWallSegments(long refId,
QueryFilter filter,
float[] segmentVerts,
long[] segmentRefs,
int maxSegments)
|
Status |
Init(NavMesh navMesh,
int maxNodes)
|
java.util.EnumSet<Status> |
InitSlicedFindPath(long startRef,
long endRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long options)
|
static int |
InsertInterval(SegInterval[] ints,
int nints,
int maxInts,
short tmin,
short tmax,
long refId)
|
java.lang.Boolean |
IsInClosedList(long refId)
|
java.lang.Boolean |
IsValidPolyRef(long refId,
QueryFilter filter)
|
DetourStatusReturn |
MoveAlongSurface(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
float[] resultPos,
long[] visited,
int maxVisitedSize)
|
DetourStatusReturn |
QueryPolygons(float[] center,
float[] extents,
QueryFilter filter,
long[] polys,
int maxPolys)
|
DetourRaycastHit |
raycast(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long[] path,
int maxPath)
|
DetourRaycastHit |
raycast(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long options,
DetourRaycastHit hit,
long prevRef)
|
DetourStatusReturn |
UpdateSlicedFindPath(int maxIter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodePool
public NodePool NodePool
NavMesh
public NavMesh NavMesh
_tinyNodePool
public NodePool _tinyNodePool
_openList
public NodeQueue _openList
_query
public QueryData _query
HScale
public static float HScale
RayCastLimitProportion
public static float RayCastLimitProportion
StraightPathStart
public static short StraightPathStart
StraightPathEnd
public static short StraightPathEnd
StraightPathOffMeshConnection
public static short StraightPathOffMeshConnection
StraightPathAreaCrossings
public static short StraightPathAreaCrossings
StraightPathAllCrossings
public static short StraightPathAllCrossings
NavMeshQuery
public NavMeshQuery()
Init
public Status Init(NavMesh navMesh,
int maxNodes)
FindPath
public DetourStatusReturn FindPath(long startRef,
long endRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long[] path,
int maxPath)
FindStraightPath
public DetourStatusReturn FindStraightPath(float[] startPos,
float[] endPos,
long[] path,
int pathSize,
float[] straightPath,
short[] straightPathFlags,
long[] straightPathRefs,
int maxStraightPath)
FindStraightPath
public DetourStatusReturn FindStraightPath(float[] startPos,
float[] endPos,
long[] path,
int pathSize,
float[] straightPath,
short[] straightPathFlags,
long[] straightPathRefs,
int maxStraightPath,
int options)
InitSlicedFindPath
public java.util.EnumSet<Status> InitSlicedFindPath(long startRef,
long endRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long options)
UpdateSlicedFindPath
public DetourStatusReturn UpdateSlicedFindPath(int maxIter)
FinalizeSlicedFindPath
public DetourStatusReturn FinalizeSlicedFindPath(long[] path,
int maxPath)
FinalizeSlicedFindPathPartial
public DetourStatusReturn FinalizeSlicedFindPathPartial(long[] existing,
int existingSize,
long[] path,
int maxPath)
FindPolysAroundCircle
public DetourStatusReturn FindPolysAroundCircle(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
float[] resultCost,
int maxResult)
FindPolysAroundShape
public DetourStatusReturn FindPolysAroundShape(long startRef,
float[] verts,
int nverts,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
float[] resultCost,
int maxResult)
FindNearestPoly
public DetourNumericReturn FindNearestPoly(float[] center,
float[] extents,
QueryFilter filter,
float[] nearestPt)
- Finds the nearest Poly to the specified center position within the extents provided.
- Parameters:
center
- extents
- filter
- nearestPt
-
- Returns:
QueryPolygons
public DetourStatusReturn QueryPolygons(float[] center,
float[] extents,
QueryFilter filter,
long[] polys,
int maxPolys)
FindLocalNeighbourhood
public DetourStatusReturn FindLocalNeighbourhood(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
long[] resultRef,
long[] resultParent,
int maxResult)
MoveAlongSurface
public DetourStatusReturn MoveAlongSurface(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
float[] resultPos,
long[] visited,
int maxVisitedSize)
raycast
public DetourRaycastHit raycast(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long[] path,
int maxPath)
raycast
public DetourRaycastHit raycast(long startRef,
float[] startPos,
float[] endPos,
QueryFilter filter,
long options,
DetourRaycastHit hit,
long prevRef)
FindDistanceToWall
public DetourNumericReturn FindDistanceToWall(long startRef,
float[] centerPos,
float maxRadius,
QueryFilter filter,
float hitDist,
float[] hitPos,
float[] hitNormal)
GetPolyWallSegments
public DetourStatusReturn GetPolyWallSegments(long refId,
QueryFilter filter,
float[] segmentVerts,
long[] segmentRefs,
int maxSegments)
InsertInterval
public static int InsertInterval(SegInterval[] ints,
int nints,
int maxInts,
short tmin,
short tmax,
long refId)
FindRandomPoint
public DetourNumericReturn FindRandomPoint(QueryFilter filter,
java.util.Random func,
long randomRef,
float[] randomPt)
FindRandomPointAroundCircle
public DetourNumericReturn FindRandomPointAroundCircle(long startRef,
float[] centerPos,
float radius,
QueryFilter filter,
java.util.Random frand,
long randomRef,
float[] randomPt)
ClosestPointOnPoly
public DetourStatusReturn ClosestPointOnPoly(long refId,
float[] pos,
float[] closest,
boolean posOverPoly)
ClosestPointOnPolyBoundary
public java.util.EnumSet<Status> ClosestPointOnPolyBoundary(long refId,
float[] pos,
float[] closest)
GetPolyHeight
public DetourNumericReturn GetPolyHeight(long refId,
float[] pos)
IsValidPolyRef
public java.lang.Boolean IsValidPolyRef(long refId,
QueryFilter filter)
IsInClosedList
public java.lang.Boolean IsInClosedList(long refId)