Planeshift
Recast.h File Reference

Go to the source code of this file.

Classes

struct  rcCompactCell
 Provides information on the content of a cell column in a compact heightfield. More...
 
struct  rcCompactHeightfield
 A compact, static heightfield representing unobstructed space. More...
 
struct  rcCompactSpan
 Represents a span of unobstructed space within a compact heightfield. More...
 
struct  rcConfig
 Specifies a configuration to use when performing Recast builds. More...
 
class  rcContext
 Provides an interface for optional logging and performance tracking of the Recast build process. More...
 
struct  rcContour
 Represents a simple, non-overlapping contour in field space. More...
 
struct  rcContourSet
 Represents a group of related contours. More...
 
struct  rcHeightfield
 A dynamic heightfield representing obstructed space. More...
 
struct  rcHeightfieldLayer
 Represents a heightfield layer within a layer set. More...
 
struct  rcHeightfieldLayerSet
 Represents a set of heightfield layers. More...
 
struct  rcPolyMesh
 Represents a polygon mesh suitable for use in building a navigation mesh. More...
 
struct  rcPolyMeshDetail
 Contains triangle meshes that represent detailed height data associated with the polygons in its associated polygon mesh object. More...
 
struct  rcSpan
 Represents a span in a heightfield. More...
 
struct  rcSpanPool
 A memory pool used for quick allocation of spans within a heightfield. More...
 

Enumerations

enum  rcBuildContoursFlags { RC_CONTOUR_TESS_WALL_EDGES = 0x01, RC_CONTOUR_TESS_AREA_EDGES = 0x02 }
 Contour build flags. More...
 
enum  rcLogCategory { RC_LOG_PROGRESS = 1, RC_LOG_WARNING, RC_LOG_ERROR }
 Recast log categories. More...
 
enum  rcTimerLabel {
  RC_TIMER_TOTAL, RC_TIMER_TEMP, RC_TIMER_RASTERIZE_TRIANGLES, RC_TIMER_BUILD_COMPACTHEIGHTFIELD,
  RC_TIMER_BUILD_CONTOURS, RC_TIMER_BUILD_CONTOURS_TRACE, RC_TIMER_BUILD_CONTOURS_SIMPLIFY, RC_TIMER_FILTER_BORDER,
  RC_TIMER_FILTER_WALKABLE, RC_TIMER_MEDIAN_AREA, RC_TIMER_FILTER_LOW_OBSTACLES, RC_TIMER_BUILD_POLYMESH,
  RC_TIMER_MERGE_POLYMESH, RC_TIMER_ERODE_AREA, RC_TIMER_MARK_BOX_AREA, RC_TIMER_MARK_CYLINDER_AREA,
  RC_TIMER_MARK_CONVEXPOLY_AREA, RC_TIMER_BUILD_DISTANCEFIELD, RC_TIMER_BUILD_DISTANCEFIELD_DIST, RC_TIMER_BUILD_DISTANCEFIELD_BLUR,
  RC_TIMER_BUILD_REGIONS, RC_TIMER_BUILD_REGIONS_WATERSHED, RC_TIMER_BUILD_REGIONS_EXPAND, RC_TIMER_BUILD_REGIONS_FLOOD,
  RC_TIMER_BUILD_REGIONS_FILTER, RC_TIMER_BUILD_LAYERS, RC_TIMER_BUILD_POLYMESHDETAIL, RC_TIMER_MERGE_POLYMESHDETAIL,
  RC_MAX_TIMERS
}
 Recast performance timer categories. More...
 

Functions

Allocation Functions

Functions used to allocate and de-allocate Recast objects.

See also
rcAllocSetCustom
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...
 
General helper functions
template<class T >
void rcSwap (T &a, T &b)
 Swaps the values of the two parameters. More...
 
template<class T >
rcMin (T a, T b)
 Returns the minimum of two values. More...
 
template<class T >
rcMax (T a, T b)
 Returns the maximum of two values. More...
 
template<class T >
rcAbs (T a)
 Returns the absolute value. More...
 
template<class T >
rcSqr (T a)
 Returns the square of the value. More...
 
template<class T >
rcClamp (T v, T mn, T mx)
 Clamps the value to the specified range. More...
 
float rcSqrt (float x)
 Returns the square root of the value. More...
 
Vector helper functions.
void rcVcross (float *dest, const float *v1, const float *v2)
 Derives the cross product of two vectors. (v1 x v2) More...
 
float rcVdot (const float *v1, const float *v2)
 Derives the dot product of two vectors. (v1 . v2) More...
 
void rcVmad (float *dest, const float *v1, const float *v2, const float s)
 Performs a scaled vector addition. (v1 + (v2 * s)) More...
 
void rcVadd (float *dest, const float *v1, const float *v2)
 Performs a vector addition. (v1 + v2) More...
 
void rcVsub (float *dest, const float *v1, const float *v2)
 Performs a vector subtraction. (v1 - v2) More...
 
void rcVmin (float *mn, const float *v)
 Selects the minimum value of each element from the specified vectors. More...
 
void rcVmax (float *mx, const float *v)
 Selects the maximum value of each element from the specified vectors. More...
 
void rcVcopy (float *dest, const float *v)
 Performs a vector copy. More...
 
float rcVdist (const float *v1, const float *v2)
 Returns the distance between two points. More...
 
float rcVdistSqr (const float *v1, const float *v2)
 Returns the square of the distance between two points. More...
 
void rcVnormalize (float *v)
 Normalizes the vector. More...
 
Heightfield Functions
See also
rcHeightfield
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...
 
void rcMarkWalkableTriangles (rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
 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, unsigned char *areas)
 Sets the area id of all triangles with a slope greater than or equal to the specified value to RC_NULL_AREA. More...
 
void rcAddSpan (rcContext *ctx, rcHeightfield &hf, const int x, const int y, const unsigned short smin, const unsigned short smax, const unsigned char area, const int flagMergeThr)
 Adds a span to the specified heightfield. More...
 
void rcRasterizeTriangle (rcContext *ctx, const float *v0, const float *v1, const float *v2, const unsigned char area, rcHeightfield &solid, const int flagMergeThr=1)
 Rasterizes a triangle into the specified heightfield. More...
 
void rcRasterizeTriangles (rcContext *ctx, const float *verts, const int nv, const int *tris, const unsigned char *areas, const int nt, rcHeightfield &solid, const int flagMergeThr=1)
 Rasterizes an indexed triangle mesh into the specified heightfield. More...
 
void rcRasterizeTriangles (rcContext *ctx, const float *verts, const int nv, const unsigned short *tris, const unsigned char *areas, const int nt, rcHeightfield &solid, const int flagMergeThr=1)
 Rasterizes an indexed triangle mesh into the specified heightfield. More...
 
void rcRasterizeTriangles (rcContext *ctx, const float *verts, const unsigned char *areas, const int nt, rcHeightfield &solid, const int flagMergeThr=1)
 Rasterizes triangles into the specified heightfield. More...
 
void rcFilterLowHangingWalkableObstacles (rcContext *ctx, const int walkableClimb, rcHeightfield &solid)
 Marks non-walkable spans as walkable if their maximum is within walkableClimp of a walkable neihbor. More...
 
void rcFilterLedgeSpans (rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &solid)
 Marks spans that are ledges as not-walkable. More...
 
void rcFilterWalkableLowHeightSpans (rcContext *ctx, int walkableHeight, rcHeightfield &solid)
 Marks walkable spans as not walkable if the clearence above the span is less than the specified height. More...
 
int rcGetHeightFieldSpanCount (rcContext *ctx, rcHeightfield &hf)
 Returns the number of spans contained in the specified heightfield. More...
 
Compact Heightfield Functions
bool rcBuildCompactHeightfield (rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &hf, rcCompactHeightfield &chf)
 Builds a compact heightfield representing open space, from a heightfield representing solid space. More...
 
bool rcErodeWalkableArea (rcContext *ctx, int radius, rcCompactHeightfield &chf)
 Erodes the walkable area within the heightfield by the specified radius. More...
 
bool rcMedianFilterWalkableArea (rcContext *ctx, rcCompactHeightfield &chf)
 Applies a median filter to walkable area types (based on area id), removing noise. More...
 
void rcMarkBoxArea (rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf)
 Applies an area id to all spans within the specified bounding box. (AABB) More...
 
void rcMarkConvexPolyArea (rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf)
 Applies the area id to the all spans within the specified convex polygon. More...
 
int rcOffsetPoly (const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts)
 Helper function to offset voncex polygons for rcMarkConvexPolyArea. More...
 
void rcMarkCylinderArea (rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf)
 Applies the area id to all spans within the specified cylinder. More...
 
bool rcBuildDistanceField (rcContext *ctx, rcCompactHeightfield &chf)
 Builds the distance field for the specified compact heightfield. More...
 
bool rcBuildRegions (rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
 Builds region data for the heightfield using watershed partitioning. More...
 
bool rcBuildRegionsMonotone (rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
 Builds region data for the heightfield using simple monotone partitioning. More...
 
void rcSetCon (rcCompactSpan &s, int dir, int i)
 Sets the neighbor connection data for the specified direction. More...
 
int rcGetCon (const rcCompactSpan &s, int dir)
 Gets neighbor connection data for the specified direction. More...
 
int rcGetDirOffsetX (int dir)
 Gets the standard width (x-axis) offset for the specified direction. More...
 
int rcGetDirOffsetY (int dir)
 Gets the standard height (z-axis) offset for the specified direction. More...
 
Layer, Contour, Polymesh, and Detail Mesh Functions
bool rcBuildHeightfieldLayers (rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
 Builds a layer set from the specified compact heightfield. More...
 
bool rcBuildContours (rcContext *ctx, rcCompactHeightfield &chf, const float maxError, const int maxEdgeLen, rcContourSet &cset, const int flags=RC_CONTOUR_TESS_WALL_EDGES)
 Builds a contour set from the region outlines in the provided compact heightfield. More...
 
bool rcBuildPolyMesh (rcContext *ctx, rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
 Builds a polygon mesh from the provided contours. More...
 
bool rcMergePolyMeshes (rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
 Merges multiple polygon meshes into a single mesh. More...
 
bool rcBuildPolyMeshDetail (rcContext *ctx, const rcPolyMesh &mesh, const rcCompactHeightfield &chf, const float sampleDist, const float sampleMaxError, rcPolyMeshDetail &dmesh)
 Builds a detail mesh from the provided polygon mesh. More...
 
bool rcCopyPolyMesh (rcContext *ctx, const rcPolyMesh &src, rcPolyMesh &dst)
 Copies the poly mesh data from src to dst. More...
 
bool rcMergePolyMeshDetails (rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
 Merges multiple detail meshes into a single detail mesh. More...
 

Variables

static const int RC_AREA_BORDER = 0x20000
 Area border flag. If a region ID has this bit set, then the associated element lies on the border of an area. (Used during the region and contour build process.) More...
 
static const unsigned short RC_BORDER_REG = 0x8000
 Heighfield border flag. If a heightfield region ID has this bit set, then the region is a border region and its spans are considered unwalkable. (Used during the region and contour build process.) More...
 
static const int RC_BORDER_VERTEX = 0x10000
 Border vertex flag. If a region ID has this bit set, then the associated element lies on a tile border. If a contour vertex's region ID has this bit set, the vertex will later be removed in order to match the segments and vertices at tile boundaries. (Used during the build process.) More...
 
static const int RC_CONTOUR_REG_MASK = 0xffff
 Applied to the region id field of contour vertices in order to extract the region id. The region id field of a vertex may have several flags applied to it. So the fields value can't be used directly. More...
 
static const unsigned short RC_MESH_NULL_IDX = 0xffff
 An value which indicates an invalid index within a mesh. More...
 
static const int RC_NOT_CONNECTED = 0x3f
 The value returned by rcGetCon if the specified direction is not connected to another span. (Has no neighbor.) More...
 
static const unsigned char RC_NULL_AREA = 0
 Represents the null area. When a data element is given this value it is considered to no longer be assigned to a usable area. (E.g. It is unwalkable.) More...
 
static const float RC_PI = 3.14159265f
 The value of PI used by Recast. More...
 
static const int RC_SPAN_HEIGHT_BITS = 13
 Defines the number of bits allocated to rcSpan::smin and rcSpan::smax. More...
 
static const int RC_SPAN_MAX_HEIGHT = (1<<RC_SPAN_HEIGHT_BITS)-1
 Defines the maximum value for rcSpan::smin and rcSpan::smax. More...
 
static const int RC_SPANS_PER_POOL = 2048
 The number of spans allocated per span spool. More...
 
static const unsigned char RC_WALKABLE_AREA = 63
 The default area id used to indicate a walkable polygon. This is also the maximum allowed area id, and the only non-null area id recognized by some steps in the build process. More...
 

Enumeration Type Documentation

Contour build flags.

See also
rcBuildContours
Enumerator
RC_CONTOUR_TESS_WALL_EDGES 

Tessellate solid (impassable) edges during contour simplification.

RC_CONTOUR_TESS_AREA_EDGES 

Tessellate edges between areas during contour simplification.

Definition at line 518 of file Recast.h.

Recast log categories.

See also
rcContext
Enumerator
RC_LOG_PROGRESS 

A progress log entry.

RC_LOG_WARNING 

A warning log entry.

RC_LOG_ERROR 

An error log entry.

Definition at line 27 of file Recast.h.

Recast performance timer categories.

See also
rcContext
Enumerator
RC_TIMER_TOTAL 

The user defined total time of the build.

RC_TIMER_TEMP 

A user defined build time.

RC_TIMER_RASTERIZE_TRIANGLES 

The time to rasterize the triangles. (See: rcRasterizeTriangle)

RC_TIMER_BUILD_COMPACTHEIGHTFIELD 

The time to build the compact heightfield. (See: rcBuildCompactHeightfield)

RC_TIMER_BUILD_CONTOURS 

The total time to build the contours. (See: rcBuildContours)

RC_TIMER_BUILD_CONTOURS_TRACE 

The time to trace the boundaries of the contours. (See: rcBuildContours)

RC_TIMER_BUILD_CONTOURS_SIMPLIFY 

The time to simplify the contours. (See: rcBuildContours)

RC_TIMER_FILTER_BORDER 

The time to filter ledge spans. (See: rcFilterLedgeSpans)

RC_TIMER_FILTER_WALKABLE 

The time to filter low height spans. (See: rcFilterWalkableLowHeightSpans)

RC_TIMER_MEDIAN_AREA 

The time to apply the median filter. (See: rcMedianFilterWalkableArea)

RC_TIMER_FILTER_LOW_OBSTACLES 

The time to filter low obstacles. (See: rcFilterLowHangingWalkableObstacles)

RC_TIMER_BUILD_POLYMESH 

The time to build the polygon mesh. (See: rcBuildPolyMesh)

RC_TIMER_MERGE_POLYMESH 

The time to merge polygon meshes. (See: rcMergePolyMeshes)

RC_TIMER_ERODE_AREA 

The time to erode the walkable area. (See: rcErodeWalkableArea)

RC_TIMER_MARK_BOX_AREA 

The time to mark a box area. (See: rcMarkBoxArea)

RC_TIMER_MARK_CYLINDER_AREA 

The time to mark a cylinder area. (See: rcMarkCylinderArea)

RC_TIMER_MARK_CONVEXPOLY_AREA 

The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)

RC_TIMER_BUILD_DISTANCEFIELD 

The total time to build the distance field. (See: rcBuildDistanceField)

RC_TIMER_BUILD_DISTANCEFIELD_DIST 

The time to build the distances of the distance field. (See: rcBuildDistanceField)

RC_TIMER_BUILD_DISTANCEFIELD_BLUR 

The time to blur the distance field. (See: rcBuildDistanceField)

RC_TIMER_BUILD_REGIONS 

The total time to build the regions. (See: rcBuildRegions, rcBuildRegionsMonotone)

RC_TIMER_BUILD_REGIONS_WATERSHED 

The total time to apply the watershed algorithm. (See: rcBuildRegions)

RC_TIMER_BUILD_REGIONS_EXPAND 

The time to expand regions while applying the watershed algorithm. (See: rcBuildRegions)

RC_TIMER_BUILD_REGIONS_FLOOD 

The time to flood regions while applying the watershed algorithm. (See: rcBuildRegions)

RC_TIMER_BUILD_REGIONS_FILTER 

The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone)

RC_TIMER_BUILD_LAYERS 

The time to build heightfield layers. (See: rcBuildHeightfieldLayers)

RC_TIMER_BUILD_POLYMESHDETAIL 

The time to build the polygon mesh detail. (See: rcBuildPolyMeshDetail)

RC_TIMER_MERGE_POLYMESHDETAIL 

The time to merge polygon mesh details. (See: rcMergePolyMeshDetails)

RC_MAX_TIMERS 

The maximum number of timers. (Used for iterating timers.)

Definition at line 36 of file Recast.h.

Function Documentation

template<class T >
T rcAbs ( a)
inline

Returns the absolute value.

Parameters
[in]aThe value.
Returns
The absolute value of the specified value.

Definition at line 572 of file Recast.h.

void rcAddSpan ( rcContext ctx,
rcHeightfield hf,
const int  x,
const int  y,
const unsigned short  smin,
const unsigned short  smax,
const unsigned char  area,
const int  flagMergeThr 
)

Adds a span to the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]hfAn initialized heightfield.
[in]xThe width index where the span is to be added. [Limits: 0 <= value < rcHeightfield::width]
[in]yThe height index where the span is to be added. [Limits: 0 <= value < rcHeightfield::height]
[in]sminThe minimum height of the span. [Limit: < smax] [Units: vx]
[in]smaxThe maximum height of the span. [Limit: <= RC_SPAN_MAX_HEIGHT] [Units: vx]
[in]areaThe area id of the span. [Limit: <= RC_WALKABLE_AREA)
[in]flagMergeThrThe merge theshold. [Limit: >= 0] [Units: vx]
rcCompactHeightfield* rcAllocCompactHeightfield ( )

Allocates a compact heightfield object using the Recast allocator.

Returns
A compact heightfield that is ready for initialization, or null on failure.
See also
rcBuildCompactHeightfield, rcFreeCompactHeightfield
rcContourSet* rcAllocContourSet ( )

Allocates a contour set object using the Recast allocator.

Returns
A contour set that is ready for initialization, or null on failure.
See also
rcBuildContours, rcFreeContourSet
rcHeightfield* rcAllocHeightfield ( )

Allocates a heightfield object using the Recast allocator.

Returns
A heightfield that is ready for initialization, or null on failure.
See also
rcCreateHeightfield, rcFreeHeightField
rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet ( )

Allocates a heightfield layer set using the Recast allocator.

Returns
A heightfield layer set that is ready for initialization, or null on failure.
See also
rcBuildHeightfieldLayers, rcFreeHeightfieldLayerSet
rcPolyMesh* rcAllocPolyMesh ( )

Allocates a polygon mesh object using the Recast allocator.

Returns
A polygon mesh that is ready for initialization, or null on failure.
See also
rcBuildPolyMesh, rcFreePolyMesh
rcPolyMeshDetail* rcAllocPolyMeshDetail ( )

Allocates a detail mesh object using the Recast allocator.

Returns
A detail mesh that is ready for initialization, or null on failure.
See also
rcBuildPolyMeshDetail, rcFreePolyMeshDetail
bool rcBuildCompactHeightfield ( rcContext ctx,
const int  walkableHeight,
const int  walkableClimb,
rcHeightfield hf,
rcCompactHeightfield chf 
)

Builds a compact heightfield representing open space, from a heightfield representing solid space.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableHeightMinimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. [Limit: >= 3] [Units: vx]
[in]walkableClimbMaximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]
[in]hfThe heightfield to be compacted.
[out]chfThe resulting compact heightfield. (Must be pre-allocated.)
Returns
True if the operation completed successfully.
bool rcBuildContours ( rcContext ctx,
rcCompactHeightfield chf,
const float  maxError,
const int  maxEdgeLen,
rcContourSet cset,
const int  flags = RC_CONTOUR_TESS_WALL_EDGES 
)

Builds a contour set from the region outlines in the provided compact heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]chfA fully built compact heightfield.
[in]maxErrorThe maximum distance a simplfied contour's border edges should deviate the original raw contour. [Limit: >=0] [Units: wu]
[in]maxEdgeLenThe maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]
[out]csetThe resulting contour set. (Must be pre-allocated.)
[in]buildFlagsThe build flags. (See: rcBuildContoursFlags)
Returns
True if the operation completed successfully.
bool rcBuildDistanceField ( rcContext ctx,
rcCompactHeightfield chf 
)

Builds the distance field for the specified compact heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]chfA populated compact heightfield.
Returns
True if the operation completed successfully.
bool rcBuildHeightfieldLayers ( rcContext ctx,
rcCompactHeightfield chf,
const int  borderSize,
const int  walkableHeight,
rcHeightfieldLayerSet lset 
)

Builds a layer set from the specified compact heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]chfA fully built compact heightfield.
[in]borderSizeThe size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]
[in]walkableHeightMinimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. [Limit: >= 3] [Units: vx]
[out]lsetThe resulting layer set. (Must be pre-allocated.)
Returns
True if the operation completed successfully.
bool rcBuildPolyMesh ( rcContext ctx,
rcContourSet cset,
const int  nvp,
rcPolyMesh mesh 
)

Builds a polygon mesh from the provided contours.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]csetA fully built contour set.
[in]nvpThe maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. [Limit: >= 3]
[out]meshThe resulting polygon mesh. (Must be re-allocated.)
Returns
True if the operation completed successfully.
bool rcBuildPolyMeshDetail ( rcContext ctx,
const rcPolyMesh mesh,
const rcCompactHeightfield chf,
const float  sampleDist,
const float  sampleMaxError,
rcPolyMeshDetail dmesh 
)

Builds a detail mesh from the provided polygon mesh.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]meshA fully built polygon mesh.
[in]chfThe compact heightfield used to build the polygon mesh.
[in]sampleDistSets the distance to use when samping the heightfield. [Limit: >=0] [Units: wu]
[in]sampleMaxErrorThe maximum distance the detail mesh surface should deviate from heightfield data. [Limit: >=0] [Units: wu]
[out]dmeshThe resulting detail mesh. (Must be pre-allocated.)
Returns
True if the operation completed successfully.
bool rcBuildRegions ( rcContext ctx,
rcCompactHeightfield chf,
const int  borderSize,
const int  minRegionArea,
const int  mergeRegionArea 
)

Builds region data for the heightfield using watershed partitioning.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]chfA populated compact heightfield.
[in]borderSizeThe size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]
[in]minRegionAreaThe minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx].
[in]mergeRegionAreaAny regions with a span count smaller than this value will, if possible, be merged with larger regions. [Limit: >=0] [Units: vx]
Returns
True if the operation completed successfully.
bool rcBuildRegionsMonotone ( rcContext ctx,
rcCompactHeightfield chf,
const int  borderSize,
const int  minRegionArea,
const int  mergeRegionArea 
)

Builds region data for the heightfield using simple monotone partitioning.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]chfA populated compact heightfield.
[in]borderSizeThe size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]
[in]minRegionAreaThe minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx].
[in]mergeRegionAreaAny regions with a span count smaller than this value will, if possible, be merged with larger regions. [Limit: >=0] [Units: vx]
Returns
True if the operation completed successfully.
void rcCalcBounds ( const float verts,
int  nv,
float bmin,
float bmax 
)

Calculates the bounding box of an array of vertices.

Parameters
[in]vertsAn array of vertices. [(x, y, z) * nv]
[in]nvThe number of vertices in the verts array.
[out]bminThe minimum bounds of the AABB. [(x, y, z)] [Units: wu]
[out]bmaxThe maximum bounds of the AABB. [(x, y, z)] [Units: wu]
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.

Parameters
[in]bminThe minimum bounds of the AABB. [(x, y, z)] [Units: wu]
[in]bmaxThe maximum bounds of the AABB. [(x, y, z)] [Units: wu]
[in]csThe xz-plane cell size. [Limit: > 0] [Units: wu]
[out]wThe width along the x-axis. [Limit: >= 0] [Units: vx]
[out]hThe height along the z-axis. [Limit: >= 0] [Units: vx]
template<class T >
T rcClamp ( v,
mn,
mx 
)
inline

Clamps the value to the specified range.

Parameters
[in]vThe value to clamp.
[in]mnThe minimum permitted return value.
[in]mxThe maximum permitted return value.
Returns
The value, clamped to the specified range.

Definition at line 584 of file Recast.h.

void rcClearUnwalkableTriangles ( rcContext ctx,
const float  walkableSlopeAngle,
const float verts,
int  nv,
const int tris,
int  nt,
unsigned char *  areas 
)

Sets the area id of all triangles with a slope greater than or equal to the specified value to RC_NULL_AREA.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableSlopeAngleThe maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees]
[in]vertsThe vertices. [(x, y, z) * nv]
[in]nvThe number of vertices.
[in]trisThe triangle vertex indices. [(vertA, vertB, vertC) * nt]
[in]ntThe number of triangles.
[out]areasThe triangle area ids. [Length: >= nt]
bool rcCopyPolyMesh ( rcContext ctx,
const rcPolyMesh src,
rcPolyMesh dst 
)

Copies the poly mesh data from src to dst.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]srcThe source mesh to copy from.
[out]dstThe resulting detail mesh. (Must be pre-allocated, must be empty mesh.)
Returns
True if the operation completed successfully.
bool rcCreateHeightfield ( rcContext ctx,
rcHeightfield hf,
int  width,
int  height,
const float bmin,
const float bmax,
float  cs,
float  ch 
)

Initializes a new heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]hfThe allocated heightfield to initialize.
[in]widthThe width of the field along the x-axis. [Limit: >= 0] [Units: vx]
[in]heightThe height of the field along the z-axis. [Limit: >= 0] [Units: vx]
[in]bminThe minimum bounds of the field's AABB. [(x, y, z)] [Units: wu]
[in]bmaxThe maximum bounds of the field's AABB. [(x, y, z)] [Units: wu]
[in]csThe xz-plane cell size to use for the field. [Limit: > 0] [Units: wu]
[in]chThe y-axis cell size to use for field. [Limit: > 0] [Units: wu]
bool rcErodeWalkableArea ( rcContext ctx,
int  radius,
rcCompactHeightfield chf 
)

Erodes the walkable area within the heightfield by the specified radius.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]radiusThe radius of erosion. [Limits: 0 < value < 255] [Units: vx]
[in,out]chfThe populated compact heightfield to erode.
Returns
True if the operation completed successfully.
void rcFilterLedgeSpans ( rcContext ctx,
const int  walkableHeight,
const int  walkableClimb,
rcHeightfield solid 
)

Marks spans that are ledges as not-walkable.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableHeightMinimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. [Limit: >= 3] [Units: vx]
[in]walkableClimbMaximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]
[in,out]solidA fully built heightfield. (All spans have been added.)
void rcFilterLowHangingWalkableObstacles ( rcContext ctx,
const int  walkableClimb,
rcHeightfield solid 
)

Marks non-walkable spans as walkable if their maximum is within walkableClimp of a walkable neihbor.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableClimbMaximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]
[in,out]solidA fully built heightfield. (All spans have been added.)
void rcFilterWalkableLowHeightSpans ( rcContext ctx,
int  walkableHeight,
rcHeightfield solid 
)

Marks walkable spans as not walkable if the clearence above the span is less than the specified height.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableHeightMinimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. [Limit: >= 3] [Units: vx]
[in,out]solidA fully built heightfield. (All spans have been added.)
void rcFreeCompactHeightfield ( rcCompactHeightfield chf)

Frees the specified compact heightfield object using the Recast allocator.

Parameters
[in]chfA compact heightfield allocated using rcAllocCompactHeightfield
See also
rcAllocCompactHeightfield
void rcFreeContourSet ( rcContourSet cset)

Frees the specified contour set using the Recast allocator.

Parameters
[in]csetA contour set allocated using rcAllocContourSet
See also
rcAllocContourSet
void rcFreeHeightField ( rcHeightfield hf)

Frees the specified heightfield object using the Recast allocator.

Parameters
[in]hfA heightfield allocated using rcAllocHeightfield
See also
rcAllocHeightfield
void rcFreeHeightfieldLayerSet ( rcHeightfieldLayerSet lset)

Frees the specified heightfield layer set using the Recast allocator.

Parameters
[in]lsetA heightfield layer set allocated using rcAllocHeightfieldLayerSet
See also
rcAllocHeightfieldLayerSet
void rcFreePolyMesh ( rcPolyMesh pmesh)

Frees the specified polygon mesh using the Recast allocator.

Parameters
[in]pmeshA polygon mesh allocated using rcAllocPolyMesh
See also
rcAllocPolyMesh
void rcFreePolyMeshDetail ( rcPolyMeshDetail dmesh)

Frees the specified detail mesh using the Recast allocator.

Parameters
[in]dmeshA detail mesh allocated using rcAllocPolyMeshDetail
See also
rcAllocPolyMeshDetail
int rcGetCon ( const rcCompactSpan s,
int  dir 
)
inline

Gets neighbor connection data for the specified direction.

Parameters
[in]sThe span to check.
[in]dirThe direction to check. [Limits: 0 <= value < 4]
Returns
The neighbor connection data for the specified direction, or RC_NOT_CONNECTED if there is no connection.

Definition at line 1012 of file Recast.h.

int rcGetDirOffsetX ( int  dir)
inline

Gets the standard width (x-axis) offset for the specified direction.

Parameters
[in]dirThe direction. [Limits: 0 <= value < 4]
Returns
The width offset to apply to the current cell position to move in the direction.

Definition at line 1022 of file Recast.h.

int rcGetDirOffsetY ( int  dir)
inline

Gets the standard height (z-axis) offset for the specified direction.

Parameters
[in]dirThe direction. [Limits: 0 <= value < 4]
Returns
The height offset to apply to the current cell position to move in the direction.

Definition at line 1032 of file Recast.h.

int rcGetHeightFieldSpanCount ( rcContext ctx,
rcHeightfield hf 
)

Returns the number of spans contained in the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]hfAn initialized heightfield.
Returns
The number of spans in the heightfield.
void rcMarkBoxArea ( rcContext ctx,
const float bmin,
const float bmax,
unsigned char  areaId,
rcCompactHeightfield chf 
)

Applies an area id to all spans within the specified bounding box. (AABB)

Parameters
[in,out]ctxThe build context to use during the operation.
[in]bminThe minimum of the bounding box. [(x, y, z)]
[in]bmaxThe maximum of the bounding box. [(x, y, z)]
[in]areaIdThe area id to apply. [Limit: <= RC_WALKABLE_AREA]
[in,out]chfA populated compact heightfield.
void rcMarkConvexPolyArea ( rcContext ctx,
const float verts,
const int  nverts,
const float  hmin,
const float  hmax,
unsigned char  areaId,
rcCompactHeightfield chf 
)

Applies the area id to the all spans within the specified convex polygon.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]vertsThe vertices of the polygon [Fomr: (x, y, z) * nverts]
[in]nvertsThe number of vertices in the polygon.
[in]hminThe height of the base of the polygon.
[in]hmaxThe height of the top of the polygon.
[in]areaIdThe area id to apply. [Limit: <= RC_WALKABLE_AREA]
[in,out]chfA populated compact heightfield.
void rcMarkCylinderArea ( rcContext ctx,
const float pos,
const float  r,
const float  h,
unsigned char  areaId,
rcCompactHeightfield chf 
)

Applies the area id to all spans within the specified cylinder.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]posThe center of the base of the cylinder. [Form: (x, y, z)]
[in]rThe radius of the cylinder.
[in]hThe height of the cylinder.
[in]areaIdThe area id to apply. [Limit: <= RC_WALKABLE_AREA]
[in,out]chfA populated compact heightfield.
void rcMarkWalkableTriangles ( rcContext ctx,
const float  walkableSlopeAngle,
const float verts,
int  nv,
const int tris,
int  nt,
unsigned char *  areas 
)

Sets the area id of all triangles with a slope below the specified value to RC_WALKABLE_AREA.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]walkableSlopeAngleThe maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees]
[in]vertsThe vertices. [(x, y, z) * nv]
[in]nvThe number of vertices.
[in]trisThe triangle vertex indices. [(vertA, vertB, vertC) * nt]
[in]ntThe number of triangles.
[out]areasThe triangle area ids. [Length: >= nt]
template<class T >
T rcMax ( a,
b 
)
inline

Returns the maximum of two values.

Parameters
[in]aValue A
[in]bValue B
Returns
The maximum of the two values.

Definition at line 567 of file Recast.h.

bool rcMedianFilterWalkableArea ( rcContext ctx,
rcCompactHeightfield chf 
)

Applies a median filter to walkable area types (based on area id), removing noise.

Parameters
[in,out]ctxThe build context to use during the operation.
[in,out]chfA populated compact heightfield.
Returns
True if the operation completed successfully.
bool rcMergePolyMeshDetails ( rcContext ctx,
rcPolyMeshDetail **  meshes,
const int  nmeshes,
rcPolyMeshDetail mesh 
)

Merges multiple detail meshes into a single detail mesh.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]meshesAn array of detail meshes to merge. [Size: nmeshes]
[in]nmeshesThe number of detail meshes in the meshes array.
[out]meshThe resulting detail mesh. (Must be pre-allocated.)
Returns
True if the operation completed successfully.
bool rcMergePolyMeshes ( rcContext ctx,
rcPolyMesh **  meshes,
const int  nmeshes,
rcPolyMesh mesh 
)

Merges multiple polygon meshes into a single mesh.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]meshesAn array of polygon meshes to merge. [Size: nmeshes]
[in]nmeshesThe number of polygon meshes in the meshes array.
[in]meshThe resulting polygon mesh. (Must be pre-allocated.)
Returns
True if the operation completed successfully.
template<class T >
T rcMin ( a,
b 
)
inline

Returns the minimum of two values.

Parameters
[in]aValue A
[in]bValue B
Returns
The minimum of the two values.

Definition at line 561 of file Recast.h.

int rcOffsetPoly ( const float verts,
const int  nverts,
const float  offset,
float outVerts,
const int  maxOutVerts 
)

Helper function to offset voncex polygons for rcMarkConvexPolyArea.

Parameters
[in]vertsThe vertices of the polygon [Form: (x, y, z) * nverts]
[in]nvertsThe number of vertices in the polygon.
[out]outVertsThe offset vertices (should hold up to 2 * nverts) [Form: (x, y, z) * return value]
[in]maxOutVertsThe max number of vertices that can be stored to outVerts.
Returns
Number of vertices in the offset polygon or 0 if too few vertices in outVerts.
void rcRasterizeTriangle ( rcContext ctx,
const float v0,
const float v1,
const float v2,
const unsigned char  area,
rcHeightfield solid,
const int  flagMergeThr = 1 
)

Rasterizes a triangle into the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]v0Triangle vertex 0 [(x, y, z)]
[in]v1Triangle vertex 1 [(x, y, z)]
[in]v2Triangle vertex 2 [(x, y, z)]
[in]areaThe area id of the triangle. [Limit: <= RC_WALKABLE_AREA]
[in,out]solidAn initialized heightfield.
[in]flagMergeThrThe distance where the walkable flag is favored over the non-walkable flag. [Limit: >= 0] [Units: vx]
void rcRasterizeTriangles ( rcContext ctx,
const float verts,
const int  nv,
const int tris,
const unsigned char *  areas,
const int  nt,
rcHeightfield solid,
const int  flagMergeThr = 1 
)

Rasterizes an indexed triangle mesh into the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]vertsThe vertices. [(x, y, z) * nv]
[in]nvThe number of vertices.
[in]trisThe triangle indices. [(vertA, vertB, vertC) * nt]
[in]areasThe area id's of the triangles. [Limit: <= RC_WALKABLE_AREA] [Size: nt]
[in]ntThe number of triangles.
[in,out]solidAn initialized heightfield.
[in]flagMergeThrThe distance where the walkable flag is favored over the non-walkable flag. [Limit: >= 0] [Units: vx]
void rcRasterizeTriangles ( rcContext ctx,
const float verts,
const int  nv,
const unsigned short *  tris,
const unsigned char *  areas,
const int  nt,
rcHeightfield solid,
const int  flagMergeThr = 1 
)

Rasterizes an indexed triangle mesh into the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]vertsThe vertices. [(x, y, z) * nv]
[in]nvThe number of vertices.
[in]trisThe triangle indices. [(vertA, vertB, vertC) * nt]
[in]areasThe area id's of the triangles. [Limit: <= RC_WALKABLE_AREA] [Size: nt]
[in]ntThe number of triangles.
[in,out]solidAn initialized heightfield.
[in]flagMergeThrThe distance where the walkable flag is favored over the non-walkable flag. [Limit: >= 0] [Units: vx]
void rcRasterizeTriangles ( rcContext ctx,
const float verts,
const unsigned char *  areas,
const int  nt,
rcHeightfield solid,
const int  flagMergeThr = 1 
)

Rasterizes triangles into the specified heightfield.

Parameters
[in,out]ctxThe build context to use during the operation.
[in]vertsThe triangle vertices. [(ax, ay, az, bx, by, bz, cx, by, cx) * nt]
[in]areasThe area id's of the triangles. [Limit: <= RC_WALKABLE_AREA] [Size: nt]
[in]ntThe number of triangles.
[in,out]solidAn initialized heightfield.
[in]flagMergeThrThe distance where the walkable flag is favored over the non-walkable flag. [Limit: >= 0] [Units: vx]
void rcSetCon ( rcCompactSpan s,
int  dir,
int  i 
)
inline

Sets the neighbor connection data for the specified direction.

Parameters
[in]sThe span to update.
[in]dirThe direction to set. [Limits: 0 <= value < 4]
[in]iThe index of the neighbor span.

Definition at line 1000 of file Recast.h.

template<class T >
T rcSqr ( a)
inline

Returns the square of the value.

Parameters
[in]aThe value.
Returns
The square of the value.

Definition at line 577 of file Recast.h.

float rcSqrt ( float  x)

Returns the square root of the value.

Parameters
[in]xThe value.
Returns
The square root of the vlaue.
template<class T >
void rcSwap ( T &  a,
T &  b 
)
inline

Swaps the values of the two parameters.

Parameters
[in,out]aValue A
[in,out]bValue B

Definition at line 555 of file Recast.h.

void rcVadd ( float dest,
const float v1,
const float v2 
)
inline

Performs a vector addition. (v1 + v2)

Parameters
[out]destThe result vector. [(x, y, z)]
[in]v1The base vector. [(x, y, z)]
[in]v2The vector to add to v1. [(x, y, z)]

Definition at line 631 of file Recast.h.

void rcVcopy ( float dest,
const float v 
)
inline

Performs a vector copy.

Parameters
[out]destThe result. [(x, y, z)]
[in]vThe vector to copy. [(x, y, z)]

Definition at line 672 of file Recast.h.

void rcVcross ( float dest,
const float v1,
const float v2 
)
inline

Derives the cross product of two vectors. (v1 x v2)

Parameters
[out]destThe cross product. [(x, y, z)]
[in]v1A Vector [(x, y, z)]
[in]v2A vector [(x, y, z)]

Definition at line 599 of file Recast.h.

float rcVdist ( const float v1,
const float v2 
)
inline

Returns the distance between two points.

Parameters
[in]v1A point. [(x, y, z)]
[in]v2A point. [(x, y, z)]
Returns
The distance between the two points.

Definition at line 683 of file Recast.h.

float rcVdistSqr ( const float v1,
const float v2 
)
inline

Returns the square of the distance between two points.

Parameters
[in]v1A point. [(x, y, z)]
[in]v2A point. [(x, y, z)]
Returns
The square of the distance between the two points.

Definition at line 695 of file Recast.h.

float rcVdot ( const float v1,
const float v2 
)
inline

Derives the dot product of two vectors. (v1 . v2)

Parameters
[in]v1A Vector [(x, y, z)]
[in]v2A vector [(x, y, z)]
Returns
The dot product.

Definition at line 610 of file Recast.h.

void rcVmad ( float dest,
const float v1,
const float v2,
const float  s 
)
inline

Performs a scaled vector addition. (v1 + (v2 * s))

Parameters
[out]destThe result vector. [(x, y, z)]
[in]v1The base vector. [(x, y, z)]
[in]v2The vector to scale and add to v1. [(x, y, z)]
[in]sThe amount to scale v2 by before adding to v1.

Definition at line 620 of file Recast.h.

void rcVmax ( float mx,
const float v 
)
inline

Selects the maximum value of each element from the specified vectors.

Parameters
[in,out]mxA vector. (Will be updated with the result.) [(x, y, z)]
[in]vA vector. [(x, y, z)]

Definition at line 662 of file Recast.h.

void rcVmin ( float mn,
const float v 
)
inline

Selects the minimum value of each element from the specified vectors.

Parameters
[in,out]mnA vector. (Will be updated with the result.) [(x, y, z)]
[in]vA vector. [(x, y, z)]

Definition at line 652 of file Recast.h.

void rcVnormalize ( float v)
inline

Normalizes the vector.

Parameters
[in,out]vThe vector to normalize. [(x, y, z)]

Definition at line 705 of file Recast.h.

void rcVsub ( float dest,
const float v1,
const float v2 
)
inline

Performs a vector subtraction. (v1 - v2)

Parameters
[out]destThe result vector. [(x, y, z)]
[in]v1The base vector. [(x, y, z)]
[in]v2The vector to subtract from v1. [(x, y, z)]

Definition at line 642 of file Recast.h.

Variable Documentation

const int RC_AREA_BORDER = 0x20000
static

Area border flag. If a region ID has this bit set, then the associated element lies on the border of an area. (Used during the region and contour build process.)

See also
rcCompactSpan::reg, rcContour::verts, rcContour::rverts

Definition at line 514 of file Recast.h.

const unsigned short RC_BORDER_REG = 0x8000
static

Heighfield border flag. If a heightfield region ID has this bit set, then the region is a border region and its spans are considered unwalkable. (Used during the region and contour build process.)

See also
rcCompactSpan::reg

Definition at line 498 of file Recast.h.

const int RC_BORDER_VERTEX = 0x10000
static

Border vertex flag. If a region ID has this bit set, then the associated element lies on a tile border. If a contour vertex's region ID has this bit set, the vertex will later be removed in order to match the segments and vertices at tile boundaries. (Used during the build process.)

See also
rcCompactSpan::reg, rcContour::verts, rcContour::rverts

Definition at line 507 of file Recast.h.

const int RC_CONTOUR_REG_MASK = 0xffff
static

Applied to the region id field of contour vertices in order to extract the region id. The region id field of a vertex may have several flags applied to it. So the fields value can't be used directly.

See also
rcContour::verts, rcContour::rverts

Definition at line 528 of file Recast.h.

const unsigned short RC_MESH_NULL_IDX = 0xffff
static

An value which indicates an invalid index within a mesh.

Note
This does not necessarily indicate an error.
See also
rcPolyMesh::polys

Definition at line 533 of file Recast.h.

const int RC_NOT_CONNECTED = 0x3f
static

The value returned by rcGetCon if the specified direction is not connected to another span. (Has no neighbor.)

Definition at line 547 of file Recast.h.

const unsigned char RC_NULL_AREA = 0
static

Represents the null area. When a data element is given this value it is considered to no longer be assigned to a usable area. (E.g. It is unwalkable.)

Definition at line 538 of file Recast.h.

const float RC_PI = 3.14159265f
static

The value of PI used by Recast.

Definition at line 23 of file Recast.h.

const int RC_SPAN_HEIGHT_BITS = 13
static

Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.

Definition at line 246 of file Recast.h.

const int RC_SPAN_MAX_HEIGHT = (1<<RC_SPAN_HEIGHT_BITS)-1
static

Defines the maximum value for rcSpan::smin and rcSpan::smax.

Definition at line 248 of file Recast.h.

const int RC_SPANS_PER_POOL = 2048
static

The number of spans allocated per span spool.

See also
rcSpanPool

Definition at line 252 of file Recast.h.

const unsigned char RC_WALKABLE_AREA = 63
static

The default area id used to indicate a walkable polygon. This is also the maximum allowed area id, and the only non-null area id recognized by some steps in the build process.

Definition at line 543 of file Recast.h.