Recast Navigation
Navigation-mesh Toolset for Games
|
Functions | |
void | dtClosestPtPointTriangle (float *closest, const float *p, const float *a, const float *b, const float *c) |
Derives the closest point on a triangle from the specified reference point. More... | |
bool | dtIntersectSegmentPoly2D (const float *p0, const float *p1, const float *verts, int nverts, float &tmin, float &tmax, int &segMin, int &segMax) |
float | dtDistancePtSegSqr2D (const float *pt, const float *p, const float *q, float &t) |
void | dtCalcPolyCenter (float *tc, const unsigned short *idx, int nidx, const float *verts) |
Derives the centroid of a convex polygon. More... | |
bool | dtClosestHeightPointTriangle (const float *p, const float *a, const float *b, const float *c, float &h) |
Derives the y-axis height of the closest point on the triangle from the specified reference point. More... | |
bool | dtPointInPolygon (const float *pt, const float *verts, const int nverts) |
Determines if the specified point is inside the convex polygon on the xz-plane. More... | |
bool | dtDistancePtPolyEdgesSqr (const float *pt, const float *verts, const int nverts, float *ed, float *et) |
static void | projectPoly (const float *axis, const float *poly, const int npoly, float &rmin, float &rmax) |
bool | overlapRange (const float amin, const float amax, const float bmin, const float bmax, const float eps) |
bool | dtOverlapPolyPoly2D (const float *polya, const int npolya, const float *polyb, const int npolyb) |
Determines if the two convex polygons overlap on the xz-plane. More... | |
void | dtRandomPointInConvexPoly (const float *pts, const int npts, float *areas, const float s, const float t, float *out) |
float | vperpXZ (const float *a, const float *b) |
bool | dtIntersectSegSeg2D (const float *ap, const float *aq, const float *bp, const float *bq, float &s, float &t) |
void dtCalcPolyCenter | ( | float * | tc, |
const unsigned short * | idx, | ||
int | nidx, | ||
const float * | verts | ||
) |
Derives the centroid of a convex polygon.
[out] | tc | The centroid of the polgyon. [(x, y, z)] |
[in] | idx | The polygon indices. [(vertIndex) * nidx ] |
[in] | nidx | The number of indices in the polygon. [Limit: >= 3] |
[in] | verts | The polygon vertices. [(x, y, z) * vertCount] |
bool dtClosestHeightPointTriangle | ( | const float * | p, |
const float * | a, | ||
const float * | b, | ||
const float * | c, | ||
float & | h | ||
) |
Derives the y-axis height of the closest point on the triangle from the specified reference point.
[in] | p | The reference point from which to test. [(x, y, z)] |
[in] | a | Vertex A of triangle ABC. [(x, y, z)] |
[in] | b | Vertex B of triangle ABC. [(x, y, z)] |
[in] | c | Vertex C of triangle ABC. [(x, y, z)] |
[out] | h | The resulting height. |
void dtClosestPtPointTriangle | ( | float * | closest, |
const float * | p, | ||
const float * | a, | ||
const float * | b, | ||
const float * | c | ||
) |
Derives the closest point on a triangle from the specified reference point.
[out] | closest | The closest point on the triangle. |
[in] | p | The reference point from which to test. [(x, y, z)] |
[in] | a | Vertex A of triangle ABC. [(x, y, z)] |
[in] | b | Vertex B of triangle ABC. [(x, y, z)] |
[in] | c | Vertex C of triangle ABC. [(x, y, z)] |
bool dtDistancePtPolyEdgesSqr | ( | const float * | pt, |
const float * | verts, | ||
const int | nverts, | ||
float * | ed, | ||
float * | et | ||
) |
float dtDistancePtSegSqr2D | ( | const float * | pt, |
const float * | p, | ||
const float * | q, | ||
float & | t | ||
) |
bool dtIntersectSegmentPoly2D | ( | const float * | p0, |
const float * | p1, | ||
const float * | verts, | ||
int | nverts, | ||
float & | tmin, | ||
float & | tmax, | ||
int & | segMin, | ||
int & | segMax | ||
) |
bool dtIntersectSegSeg2D | ( | const float * | ap, |
const float * | aq, | ||
const float * | bp, | ||
const float * | bq, | ||
float & | s, | ||
float & | t | ||
) |
bool dtOverlapPolyPoly2D | ( | const float * | polya, |
const int | npolya, | ||
const float * | polyb, | ||
const int | npolyb | ||
) |
Determines if the two convex polygons overlap on the xz-plane.
All vertices are projected onto the xz-plane, so the y-values are ignored.
bool dtPointInPolygon | ( | const float * | pt, |
const float * | verts, | ||
const int | nverts | ||
) |
Determines if the specified point is inside the convex polygon on the xz-plane.
All points are projected onto the xz-plane, so the y-values are ignored.
void dtRandomPointInConvexPoly | ( | const float * | pts, |
const int | npts, | ||
float * | areas, | ||
const float | s, | ||
const float | t, | ||
float * | out | ||
) |
|
inline |
|
static |
|
inline |