Recast Navigation  1.0.35
Recast.cpp File Reference
#include <float.h>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
#include "Recast.h"
#include "RecastAlloc.h"
#include "RecastAssert.h"

Macros

#define _USE_MATH_DEFINES
 

Functions

float rcSqrt (float x)
 Returns the square root of the value. More...
 
rcHeightfieldrcAllocHeightfield ()
 Allocates a heightfield object using the Recast allocator. More...
 
void rcFreeHeightField (rcHeightfield *hf)
 Frees the specified heightfield object using the Recast allocator. More...
 
rcCompactHeightfieldrcAllocCompactHeightfield ()
 Allocates a compact heightfield object using the Recast allocator. More...
 
void rcFreeCompactHeightfield (rcCompactHeightfield *chf)
 Frees the specified compact heightfield object using the Recast allocator. More...
 
rcHeightfieldLayerSetrcAllocHeightfieldLayerSet ()
 Allocates a heightfield layer set using the Recast allocator. More...
 
void rcFreeHeightfieldLayerSet (rcHeightfieldLayerSet *lset)
 Frees the specified heightfield layer set using the Recast allocator. More...
 
rcContourSetrcAllocContourSet ()
 Allocates a contour set object using the Recast allocator. More...
 
void rcFreeContourSet (rcContourSet *cset)
 Frees the specified contour set using the Recast allocator. More...
 
rcPolyMeshrcAllocPolyMesh ()
 Allocates a polygon mesh object using the Recast allocator. More...
 
void rcFreePolyMesh (rcPolyMesh *pmesh)
 Frees the specified polygon mesh using the Recast allocator. More...
 
rcPolyMeshDetailrcAllocPolyMeshDetail ()
 Allocates a detail mesh object using the Recast allocator. More...
 
void rcFreePolyMeshDetail (rcPolyMeshDetail *dmesh)
 Frees the specified detail mesh using the Recast allocator. More...
 
void rcCalcBounds (const float *verts, int nv, float *bmin, float *bmax)
 Calculates the bounding box of an array of vertices. More...
 
void rcCalcGridSize (const float *bmin, const float *bmax, float cs, int *w, int *h)
 Calculates the grid size based on the bounding box and grid cell size. More...
 
bool rcCreateHeightfield (rcContext *ctx, rcHeightfield &hf, int width, int height, const float *bmin, const float *bmax, float cs, float ch)
 Initializes a new heightfield. More...
 
static void calcTriNormal (const float *v0, const float *v1, const float *v2, float *norm)
 
void rcMarkWalkableTriangles (rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, navAreaMask *areaMasks)
 Sets the area id of all triangles with a slope below the specified value to RC_WALKABLE_AREA. More...
 
void rcClearUnwalkableTriangles (rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, navAreaMask *areaMasks)
 Sets the area id of all triangles with a slope greater than or equal to the specified value to RC_NULL_AREA. More...
 
int rcGetHeightFieldSpanCount (rcContext *ctx, rcHeightfield &hf)
 Returns the number of spans contained in the specified heightfield. More...
 

Macro Definition Documentation

#define _USE_MATH_DEFINES

Function Documentation

static void calcTriNormal ( const float *  v0,
const float *  v1,
const float *  v2,
float *  norm 
)
static
float rcSqrt ( float  x)

Returns the square root of the value.

Parameters
[in]xThe value.
Returns
The square root of the vlaue.