23 static const float RC_PI = 3.14159265f;
560 template<
class T>
inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; }
566 template<
class T>
inline T
rcMin(T a, T b) {
return a < b ? a : b; }
572 template<
class T>
inline T
rcMax(T a, T b) {
return a > b ? a : b; }
577 template<
class T>
inline T
rcAbs(T a) {
return a < 0 ? -a : a; }
582 template<
class T>
inline T
rcSqr(T a) {
return a*a; }
589 template<
class T>
inline T
rcClamp(T v, T mn, T mx) {
return v < mn ? mn : (v > mx ? mx : v); }
604 inline void rcVcross(
float* dest,
const float* v1,
const float* v2)
606 dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
607 dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
608 dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
615 inline float rcVdot(
const float* v1,
const float* v2)
617 return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
625 inline void rcVmad(
float* dest,
const float* v1,
const float* v2,
const float s)
627 dest[0] = v1[0]+v2[0]*s;
628 dest[1] = v1[1]+v2[1]*s;
629 dest[2] = v1[2]+v2[2]*s;
636 inline void rcVadd(
float* dest,
const float* v1,
const float* v2)
638 dest[0] = v1[0]+v2[0];
639 dest[1] = v1[1]+v2[1];
640 dest[2] = v1[2]+v2[2];
647 inline void rcVsub(
float* dest,
const float* v1,
const float* v2)
649 dest[0] = v1[0]-v2[0];
650 dest[1] = v1[1]-v2[1];
651 dest[2] = v1[2]-v2[2];
657 inline void rcVmin(
float* mn,
const float* v)
659 mn[0] =
rcMin(mn[0], v[0]);
660 mn[1] =
rcMin(mn[1], v[1]);
661 mn[2] =
rcMin(mn[2], v[2]);
667 inline void rcVmax(
float* mx,
const float* v)
669 mx[0] =
rcMax(mx[0], v[0]);
670 mx[1] =
rcMax(mx[1], v[1]);
671 mx[2] =
rcMax(mx[2], v[2]);
677 inline void rcVcopy(
float* dest,
const float* v)
688 inline float rcVdist(
const float* v1,
const float* v2)
690 float dx = v2[0] - v1[0];
691 float dy = v2[1] - v1[1];
692 float dz = v2[2] - v1[2];
693 return rcSqrt(dx*dx + dy*dy + dz*dz);
702 float dx = v2[0] - v1[0];
703 float dy = v2[1] - v1[1];
704 float dz = v2[2] - v1[2];
705 return dx*dx + dy*dy + dz*dz;
729 void rcCalcBounds(
const float* verts,
int nv,
float* bmin,
float* bmax);
738 void rcCalcGridSize(
const float* bmin,
const float* bmax,
float cs,
int* w,
int* h);
751 const float* bmin,
const float* bmax,
766 const int* tris,
int nt,
unsigned char* areas);
779 const int* tris,
int nt,
unsigned char* areas);
794 const unsigned short smin,
const unsigned short smax,
795 const unsigned char area,
const int flagMergeThr);
809 const int flagMergeThr = 1);
823 const int* tris,
const unsigned char* areas,
const int nt,
838 const unsigned short* tris,
const unsigned char* areas,
const int nt,
940 const float hmin,
const float hmax,
unsigned char areaId,
950 int rcOffsetPoly(
const float* verts,
const int nverts,
const float offset,
951 float* outVerts,
const int maxOutVerts);
962 const float r,
const float h,
unsigned char areaId,
984 const int borderSize,
const int minRegionArea,
const int mergeRegionArea);
996 const int borderSize,
const int minRegionArea);
1010 const int borderSize,
const int minRegionArea,
const int mergeRegionArea);
1018 const unsigned int shift = (
unsigned int)dir*6;
1019 unsigned int con = s.
con;
1020 s.
con = (con & ~(0x3f << shift)) | (((
unsigned int)i & 0x3f) << shift);
1030 const unsigned int shift = (
unsigned int)dir*6;
1031 return (s.
con >> shift) & 0x3f;
1040 const int offset[4] = { -1, 0, 1, 0, };
1041 return offset[dir&0x03];
1050 const int offset[4] = { 0, 1, 0, -1 };
1051 return offset[dir&0x03];
1070 const int borderSize,
const int walkableHeight,
1085 const float maxError,
const int maxEdgeLen,
1118 const float sampleDist,
const float sampleMaxError,
float rcSqrt(float x)
Definition: Recast.cpp:30
bool rcBuildPolyMeshDetail(rcContext *ctx, const rcPolyMesh &mesh, const rcCompactHeightfield &chf, const float sampleDist, const float sampleMaxError, rcPolyMeshDetail &dmesh)
Definition: RecastMeshDetail.cpp:1117
int getAccumulatedTime(const rcTimerLabel label) const
Definition: Recast.h:140
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
float rcVdistSqr(const float *v1, const float *v2)
Definition: Recast.h:700
unsigned char * areas
The area id assigned to each polygon. [Length: maxpolys].
Definition: Recast.h:389
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:372
The maximum number of timers. (Used for iterating timers.)
Definition: Recast.h:95
rcHeightfieldLayer * layers
The layers in the set. [Size: nlayers].
Definition: Recast.h:351
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:308
rcCompactHeightfield * rcAllocCompactHeightfield()
Definition: Recast.cpp:95
The total time to build the contours. (See: rcBuildContours)
Definition: Recast.h:47
float detailSampleMaxError
Definition: Recast.h:242
void rcFreeCompactHeightfield(rcCompactHeightfield *chf)
Definition: Recast.cpp:102
int nverts
The number of vertices.
Definition: Recast.h:390
bool m_logEnabled
True if logging is enabled.
Definition: Recast.h:170
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:276
int borderSize
The AABB border size used during the build of the field. (See: rcConfig::borderSize) ...
Definition: Recast.h:312
T rcAbs(T a)
Definition: Recast.h:577
Tessellate edges between areas during contour simplification.
Definition: Recast.h:521
int walkableRadius
Definition: Recast.h:216
unsigned short maxRegions
The maximum region id of any span within the field.
Definition: Recast.h:314
Represents a span of unobstructed space within a compact heightfield.
Definition: Recast.h:295
void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet *lset)
Definition: Recast.cpp:120
int nrverts
The number of vertices in the raw contour.
Definition: Recast.h:361
rcLogCategory
Definition: Recast.h:27
The time to build the distances of the distance field. (See: rcBuildDistanceField) ...
Definition: Recast.h:75
int hmax
The maximum height bounds of usable data. (Along the y-axis.)
Definition: Recast.h:340
Tessellate solid (impassable) edges during contour simplification.
Definition: Recast.h:520
void resetTimers()
Clears all peformance timers. (Resets all to unused.)
Definition: Recast.h:127
void enableLog(bool state)
Definition: Recast.h:112
unsigned short * dist
Array containing border distance data. [Size: spanCount].
Definition: Recast.h:321
void rcSwap(T &a, T &b)
Definition: Recast.h:560
static const int RC_NOT_CONNECTED
Definition: Recast.h:547
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:281
rcSpan items[RC_SPANS_PER_POOL]
Array of spans in the pool.
Definition: Recast.h:269
The user defined total time of the build.
Definition: Recast.h:39
float bmin[3]
The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition: Recast.h:199
bool rcCreateHeightfield(rcContext *ctx, rcHeightfield &hf, int width, int height, const float *bmin, const float *bmax, float cs, float ch)
Definition: Recast.cpp:211
int tileSize
The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx].
Definition: Recast.h:187
unsigned short reg
The id of the region the span belongs to. (Or zero if not in a region.)
Definition: Recast.h:298
int ntris
The number of triangles in tris.
Definition: Recast.h:411
The time to rasterize the triangles. (See: rcRasterizeTriangle)
Definition: Recast.h:43
int nverts
The number of vertices in the simplified contour.
Definition: Recast.h:359
void rcVnormalize(float *v)
Definition: Recast.h:710
unsigned char * heights
The heightfield. [Size: width * height].
Definition: Recast.h:341
unsigned char area
The area id assigned to the span.
Definition: Recast.h:260
bool m_timerEnabled
True if the performance timers are enabled.
Definition: Recast.h:173
rcCompactCell * cells
Array of cells. [Size: width*height].
Definition: Recast.h:319
int rcGetHeightFieldSpanCount(rcContext *ctx, rcHeightfield &hf)
Definition: Recast.cpp:297
int rcGetDirOffsetY(int dir)
Definition: Recast.h:1048
int walkableClimb
Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]...
Definition: Recast.h:212
The time to merge polygon meshes. (See: rcMergePolyMeshes)
Definition: Recast.h:63
void rcVadd(float *dest, const float *v1, const float *v2)
Definition: Recast.h:636
unsigned short y
The lower extent of the span. (Measured from the heightfield's base.)
Definition: Recast.h:297
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)
Definition: RecastRasterization.cpp:164
rcCompactSpan * spans
Array of spans. [Size: spanCount].
Definition: Recast.h:320
void resetLog()
Clears all log entries.
Definition: Recast.h:115
unsigned short * verts
The mesh vertices. [Form: (x, y, z) * nverts].
Definition: Recast.h:385
float * verts
The mesh vertices. [Size: 3*nverts].
Definition: Recast.h:407
int * rverts
Raw contour vertex and connection data. [Size: 4 * nrverts].
Definition: Recast.h:360
T rcMin(T a, T b)
Definition: Recast.h:566
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:397
unsigned int h
The height of the span. (Measured from y.)
Definition: Recast.h:300
int rcGetCon(const rcCompactSpan &s, int dir)
Definition: Recast.h:1028
unsigned int index
Index to the first span in the column.
Definition: Recast.h:290
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:395
void rcVmin(float *mn, const float *v)
Definition: Recast.h:657
rcContour * conts
An array of the contours in the set. [Size: nconts].
Definition: Recast.h:370
virtual void doStopTimer(const rcTimerLabel)
Definition: Recast.h:162
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:279
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:396
int height
The height of the set. (Along the z-axis in cell units.)
Definition: Recast.h:377
Provides information on the content of a cell column in a compact heightfield.
Definition: Recast.h:288
void rcRasterizeTriangle(rcContext *ctx, const float *v0, const float *v1, const float *v2, const unsigned char area, rcHeightfield &solid, const int flagMergeThr=1)
Definition: RecastRasterization.cpp:328
void rcSetCon(rcCompactSpan &s, int dir, int i)
Definition: Recast.h:1016
int mergeRegionArea
Definition: Recast.h:230
bool rcMergePolyMeshes(rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
Definition: RecastMesh.cpp:1302
The time to build the polygon mesh detail. (See: rcBuildPolyMeshDetail)
Definition: Recast.h:91
void rcFreeHeightField(rcHeightfield *hf)
Definition: Recast.cpp:80
The time to trace the boundaries of the contours. (See: rcBuildContours)
Definition: Recast.h:49
int nconts
The number of contours in the set.
Definition: Recast.h:371
int * verts
Simplified contour vertex and connection data. [Size: 4 * nverts].
Definition: Recast.h:358
int nmeshes
The number of sub-meshes defined by meshes.
Definition: Recast.h:409
int borderSize
The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]...
Definition: Recast.h:190
void rcFilterLedgeSpans(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &solid)
Definition: RecastFilter.cpp:84
float detailSampleDist
Definition: Recast.h:238
void rcCalcGridSize(const float *bmin, const float *bmax, float cs, int *w, int *h)
Definition: Recast.cpp:200
Represents a simple, non-overlapping contour in field space.
Definition: Recast.h:356
unsigned char * areas
Area ids. [Size: Same as heights].
Definition: Recast.h:342
int maxEdgeLen
The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]...
Definition: Recast.h:219
bool rcCopyPolyMesh(rcContext *ctx, const rcPolyMesh &src, rcPolyMesh &dst)
Definition: RecastMesh.cpp:1482
unsigned int count
Number of spans in the column.
Definition: Recast.h:291
An error log entry.
Definition: Recast.h:31
bool rcBuildLayerRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea)
Definition: RecastRegion.cpp:1670
A progress log entry.
Definition: Recast.h:29
void rcFilterLowHangingWalkableObstacles(rcContext *ctx, const int walkableClimb, rcHeightfield &solid)
Definition: RecastFilter.cpp:36
void rcFilterWalkableLowHeightSpans(rcContext *ctx, int walkableHeight, rcHeightfield &solid)
Definition: RecastFilter.cpp:180
rcSpan * freelist
The next free span.
Definition: Recast.h:284
static const int RC_SPANS_PER_POOL
Definition: Recast.h:252
int walkableHeight
Definition: Recast.h:209
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:334
void rcMarkWalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
Definition: Recast.cpp:247
static const int RC_SPAN_HEIGHT_BITS
Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.
Definition: Recast.h:246
The time to mark a box area. (See: rcMarkBoxArea)
Definition: Recast.h:67
rcContourSet * rcAllocContourSet()
Definition: Recast.cpp:134
static const int RC_SPAN_MAX_HEIGHT
Defines the maximum value for rcSpan::smin and rcSpan::smax.
Definition: Recast.h:248
unsigned int con
Packed neighbor connection data.
Definition: Recast.h:299
The time to blur the distance field. (See: rcBuildDistanceField)
Definition: Recast.h:77
virtual int doGetAccumulatedTime(const rcTimerLabel) const
Definition: Recast.h:167
The time to build heightfield layers. (See: rcBuildHeightfieldLayers)
Definition: Recast.h:89
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:329
unsigned char * tris
The mesh triangles. [Size: 4*ntris].
Definition: Recast.h:408
float rcVdist(const float *v1, const float *v2)
Definition: Recast.h:688
int maxx
The maximum x-bounds of usable data.
Definition: Recast.h:336
unsigned char area
The area id of the contour.
Definition: Recast.h:363
float maxSimplificationError
Definition: Recast.h:223
bool rcMedianFilterWalkableArea(rcContext *ctx, rcCompactHeightfield &chf)
Definition: RecastArea.cpp:241
int rcGetDirOffsetX(int dir)
Definition: Recast.h:1038
void rcMarkBoxArea(rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf)
Definition: RecastArea.cpp:320
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:280
static const unsigned short RC_MESH_NULL_IDX
Definition: Recast.h:533
float ch
The y-axis cell size to use for fields. [Limit: > 0] [Units: wu].
Definition: Recast.h:196
The total time to apply the watershed algorithm. (See: rcBuildRegions)
Definition: Recast.h:81
The total time to build the distance field. (See: rcBuildDistanceField)
Definition: Recast.h:73
rcPolyMeshDetail * rcAllocPolyMeshDetail()
Definition: Recast.cpp:171
static const int RC_BORDER_VERTEX
Definition: Recast.h:507
virtual void doStartTimer(const rcTimerLabel)
Definition: Recast.h:158
void rcCalcBounds(const float *verts, int nv, float *bmin, float *bmax)
Definition: Recast.cpp:187
rcHeightfield * rcAllocHeightfield()
Definition: Recast.cpp:73
int minx
The minimum x-bounds of usable data.
Definition: Recast.h:335
The time to filter low height spans. (See: rcFilterWalkableLowHeightSpans)
Definition: Recast.h:55
void rcVmad(float *dest, const float *v1, const float *v2, const float s)
Definition: Recast.h:625
The time to erode the walkable area. (See: rcErodeWalkableArea)
Definition: Recast.h:65
unsigned char * areas
Array containing area id data. [Size: spanCount].
Definition: Recast.h:322
static const unsigned char RC_WALKABLE_AREA
Definition: Recast.h:543
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:332
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:373
G3D::int16 y
Definition: Vector2int16.h:38
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:316
rcTimerLabel
Definition: Recast.h:36
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:307
The time to build the compact heightfield. (See: rcBuildCompactHeightfield)
Definition: Recast.h:45
unsigned int smin
The lower limit of the span. [Limit: < smax].
Definition: Recast.h:258
int maxVertsPerPoly
Definition: Recast.h:234
unsigned short reg
The region id of the contour.
Definition: Recast.h:362
static const int RC_CONTOUR_REG_MASK
Definition: Recast.h:528
virtual ~rcContext()
Definition: Recast.h:108
rcContext(bool state=true)
Definition: Recast.h:107
void rcClearUnwalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
Definition: Recast.cpp:276
bool rcBuildHeightfieldLayers(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
Definition: RecastLayers.cpp:84
The total time to build the regions. (See: rcBuildRegions, rcBuildRegionsMonotone) ...
Definition: Recast.h:79
void rcVcopy(float *dest, const float *v)
Definition: Recast.h:677
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:374
float bmax[3]
The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition: Recast.h:202
void startTimer(const rcTimerLabel label)
Definition: Recast.h:131
void rcMarkCylinderArea(rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf)
Definition: RecastArea.cpp:538
void rcVsub(float *dest, const float *v1, const float *v2)
Definition: Recast.h:647
float walkableSlopeAngle
The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees].
Definition: Recast.h:205
rcPolyMesh * rcAllocPolyMesh()
Definition: Recast.cpp:153
int spanCount
The number of spans in the heightfield.
Definition: Recast.h:309
int walkableHeight
The walkable height used during the build of the field. (See: rcConfig::walkableHeight) ...
Definition: Recast.h:310
bool rcErodeWalkableArea(rcContext *ctx, int radius, rcCompactHeightfield &chf)
Definition: RecastArea.cpp:37
unsigned char * cons
Packed neighbor connection information. [Size: Same as heights].
Definition: Recast.h:343
virtual void doResetTimers()
Clears all timers. (Resets all to unused.)
Definition: Recast.h:154
T rcSqr(T a)
Definition: Recast.h:582
int maxy
The maximum y-bounds of usable data. (Along the z-axis.)
Definition: Recast.h:338
T rcClamp(T v, T mn, T mx)
Definition: Recast.h:589
unsigned int smax
The upper limit of the span. [Limit: <= RC_SPAN_MAX_HEIGHT].
Definition: Recast.h:259
int rcOffsetPoly(const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts)
Definition: RecastArea.cpp:455
rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet()
Definition: Recast.cpp:113
The time to flood regions while applying the watershed algorithm. (See: rcBuildRegions) ...
Definition: Recast.h:85
A user defined build time.
Definition: Recast.h:41
The time to expand regions while applying the watershed algorithm. (See: rcBuildRegions) ...
Definition: Recast.h:83
void rcFreePolyMeshDetail(rcPolyMeshDetail *dmesh)
Definition: Recast.cpp:178
unsigned short * flags
The user defined flags for each polygon. [Length: maxpolys].
Definition: Recast.h:388
virtual void doResetLog()
Clears all log entries.
Definition: Recast.h:145
void enableTimer(bool state)
Definition: Recast.h:124
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:317
The time to merge polygon mesh details. (See: rcMergePolyMeshDetails)
Definition: Recast.h:93
unsigned short maxDistance
The maximum distance value of any span within the field.
Definition: Recast.h:313
int height
The height of the field along the z-axis. [Limit: >= 0] [Units: vx].
Definition: Recast.h:184
static const int RC_AREA_BORDER
Definition: Recast.h:514
static const float RC_PI
The value of PI used by Recast.
Definition: Recast.h:23
int width
The width of the set. (Along the x-axis in cell units.)
Definition: Recast.h:376
float cs
The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu].
Definition: Recast.h:193
The time to build the polygon mesh. (See: rcBuildPolyMesh)
Definition: Recast.h:61
bool rcBuildDistanceField(rcContext *ctx, rcCompactHeightfield &chf)
Definition: RecastRegion.cpp:1256
bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
Definition: RecastRegion.cpp:1532
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)
Definition: RecastRasterization.cpp:348
rcSpan * next
The next span higher up in column.
Definition: Recast.h:261
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:278
int borderSize
The AABB border size used to generate the source data from which the mesh was derived.
Definition: Recast.h:398
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:318
static const unsigned char RC_NULL_AREA
Definition: Recast.h:538
void rcVcross(float *dest, const float *v1, const float *v2)
Definition: Recast.h:604
int nlayers
The number of layers in the set.
Definition: Recast.h:352
T rcMax(T a, T b)
Definition: Recast.h:572
rcSpanPool * next
The next span pool.
Definition: Recast.h:268
void log(const rcLogCategory category, const char *format,...)
Definition: Recast.cpp:55
int borderSize
The AABB border size used to generate the source data from which the contours were derived...
Definition: Recast.h:378
The time to apply the median filter. (See: rcMedianFilterWalkableArea)
Definition: Recast.h:57
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:375
unsigned int * meshes
The sub-mesh data. [Size: 4*nmeshes].
Definition: Recast.h:406
G3D::int16 x
Definition: Vector2int16.h:37
int npolys
The number of polygons.
Definition: Recast.h:391
bool rcBuildRegionsMonotone(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
Definition: RecastRegion.cpp:1357
bool rcBuildContours(rcContext *ctx, rcCompactHeightfield &chf, const float maxError, const int maxEdgeLen, rcContourSet &cset, const int buildFlags=RC_CONTOUR_TESS_WALL_EDGES)
Definition: RecastContour.cpp:824
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:277
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:333
virtual void doLog(const rcLogCategory, const char *, const int)
Definition: Recast.h:151
float rcVdot(const float *v1, const float *v2)
Definition: Recast.h:615
The time to mark a cylinder area. (See: rcMarkCylinderArea)
Definition: Recast.h:69
void stopTimer(const rcTimerLabel label)
Definition: Recast.h:135
int walkableClimb
The walkable climb used during the build of the field. (See: rcConfig::walkableClimb) ...
Definition: Recast.h:311
int minRegionArea
The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx]...
Definition: Recast.h:226
int maxpolys
The number of allocated polygons.
Definition: Recast.h:392
rcBuildContoursFlags
Definition: Recast.h:518
unsigned short * regs
The region id assigned to each polygon. [Length: maxpolys].
Definition: Recast.h:387
rcSpanPool * pools
Linked list of span pools.
Definition: Recast.h:283
The time to filter ledge spans. (See: rcFilterLedgeSpans)
Definition: Recast.h:53
The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)
Definition: Recast.h:71
int nverts
The number of vertices in verts.
Definition: Recast.h:410
void rcFreePolyMesh(rcPolyMesh *pmesh)
Definition: Recast.cpp:160
static const unsigned short RC_BORDER_REG
Definition: Recast.h:498
A warning log entry.
Definition: Recast.h:30
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:394
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:330
bool rcBuildPolyMesh(rcContext *ctx, rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
Definition: RecastMesh.cpp:982
void rcIgnoreUnused(const T &)
Definition: Recast.h:555
int width
The width of the field along the x-axis. [Limit: >= 0] [Units: vx].
Definition: Recast.h:181
int hmin
The minimum height bounds of usable data. (Along the y-axis.)
Definition: Recast.h:339
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:331
The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone) ...
Definition: Recast.h:87
rcSpan ** spans
Heightfield of spans (width*height).
Definition: Recast.h:282
int nvp
The maximum number of vertices per polygon.
Definition: Recast.h:393
The time to simplify the contours. (See: rcBuildContours)
Definition: Recast.h:51
void rcMarkConvexPolyArea(rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf)
Definition: RecastArea.cpp:388
bool rcMergePolyMeshDetails(rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
Definition: RecastMeshDetail.cpp:1336
void rcVmax(float *mx, const float *v)
Definition: Recast.h:667
unsigned short * polys
Polygon and neighbor data. [Length: maxpolys * 2 * nvp].
Definition: Recast.h:386
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:315
The time to filter low obstacles. (See: rcFilterLowHangingWalkableObstacles)
Definition: Recast.h:59
void rcFreeContourSet(rcContourSet *cset)
Definition: Recast.cpp:141
bool rcBuildCompactHeightfield(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &hf, rcCompactHeightfield &chf)
Definition: Recast.cpp:327
int miny
The minimum y-bounds of usable data. (Along the z-axis.)
Definition: Recast.h:337