Atoms Crowd  7.0.0
Recast.h
1 // Modified version of Recast/Detour's source file
2 //
3 // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
4 //
5 // This software is provided 'as-is', without any express or implied
6 // warranty. In no event will the authors be held liable for any damages
7 // arising from the use of this software.
8 // Permission is granted to anyone to use this software for any purpose,
9 // including commercial applications, and to alter it and redistribute it
10 // freely, subject to the following restrictions:
11 // 1. The origin of this software must not be misrepresented; you must not
12 // claim that you wrote the original software. If you use this software
13 // in a product, an acknowledgment in the product documentation would be
14 // appreciated but is not required.
15 // 2. Altered source versions must be plainly marked as such, and must not be
16 // misrepresented as being the original software.
17 // 3. This notice may not be removed or altered from any source distribution.
18 //
19 
20 #ifndef RECAST_H
21 #define RECAST_H
22 
23 #include <AtomsUtils/Globals.h>
24 #include <cstring>
25 #include <cmath>
26 #include <float.h>
27 
28 namespace AtomsUtils
29 {
30 
32 static const float RC_PI = 3.14159265f;
33 
37 {
41 };
42 
46 {
107 };
108 
112 class ATOMSUTILS_EXPORT rcContext
113 {
114 public:
115 
118  inline rcContext(bool state = true) : m_logEnabled(state), m_timerEnabled(state) {}
119  virtual ~rcContext() {}
120 
123  inline void enableLog(bool state) { m_logEnabled = state; }
124 
126  inline void resetLog() { if (m_logEnabled) doResetLog(); }
127 
131  void log(const rcLogCategory category, const char* format, ...);
132 
135  inline void enableTimer(bool state) { m_timerEnabled = state; }
136 
138  inline void resetTimers() { if (m_timerEnabled) doResetTimers(); }
139 
142  inline void startTimer(const rcTimerLabel label) { if (m_timerEnabled) doStartTimer(label); }
143 
146  inline void stopTimer(const rcTimerLabel label) { if (m_timerEnabled) doStopTimer(label); }
147 
151  inline int getAccumulatedTime(const rcTimerLabel label) const { return m_timerEnabled ? doGetAccumulatedTime(label) : -1; }
152 
153 protected:
154 
156  virtual void doResetLog() {}
157 
162  virtual void doLog(const rcLogCategory /*category*/, const char* /*msg*/, const int /*len*/) {}
163 
165  virtual void doResetTimers() {}
166 
169  virtual void doStartTimer(const rcTimerLabel /*label*/) {}
170 
173  virtual void doStopTimer(const rcTimerLabel /*label*/) {}
174 
178  virtual int doGetAccumulatedTime(const rcTimerLabel /*label*/) const { return -1; }
179 
182 
185 };
186 
190 {
194 };
195 
198 struct rcConfig
199 {
201  int width;
202 
204  int height;
205 
207  int tileSize;
208 
211 
213  float cs;
214 
216  float ch;
217 
219  float bmin[3];
220 
222  float bmax[3];
223 
226 
230 
233 
237 
240 
244 
247 
251 
254 
257 
261 
265 
269 };
270 
272 static const int RC_SPAN_HEIGHT_BITS = 13;
274 static const int RC_SPAN_MAX_HEIGHT = (1<<RC_SPAN_HEIGHT_BITS)-1;
275 
278 static const int RC_SPANS_PER_POOL = 2048;
279 
283 {
284  unsigned int smin : RC_SPAN_HEIGHT_BITS;
285  unsigned int smax : RC_SPAN_HEIGHT_BITS;
286  unsigned int area : 6;
287 };
288 
290 {
291  unsigned short x;
292  unsigned short y;
293  rcSpanData data;
294 };
295 
298 struct rcSpan
299 {
302 };
303 
307 {
309  rcSpan items[RC_SPANS_PER_POOL];
310 };
311 
312 
313 #define EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER 1
314 
315 #if EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
316 struct rcRowExt
317 {
318  int MinCol;
319  int MaxCol;
320 };
321 struct rcEdgeHit
322 {
323  unsigned char Hits[2];
324 };
326 {
327  short int sminmax[2];
328 };
329 #endif
330 
334 {
335  int width;
336  int height;
337  float bmin[3];
338  float bmax[3];
339  float cs;
340  float ch;
344 
345 #if EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
349 #endif
350 };
351 
354 {
355  unsigned int index : 24;
356  unsigned int count : 8;
357 };
358 
361 {
362  unsigned short y;
363  unsigned short reg;
364  unsigned int con;
365  unsigned char h;
366 };
367 
371 {
372  int width;
373  int height;
374  int spanCount;
378  unsigned short maxDistance;
379  unsigned short maxRegions;
380  float bmin[3];
381  float bmax[3];
382  float cs;
383  float ch;
386  unsigned short* dist;
387  unsigned char* areas;
388 };
389 
393 {
394  float bmin[3];
395  float bmax[3];
396  float cs;
397  float ch;
398  int width;
399  int height;
400  int minx;
401  int maxx;
402  int miny;
403  int maxy;
404  int hmin;
405  int hmax;
406  unsigned short* heights;
407  unsigned char* areas;
408  unsigned char* cons;
409 };
410 
415 {
417  int nlayers;
418 };
419 
421 struct rcContour
422 {
423  int* verts;
424  int nverts;
425  int* rverts;
426  int nrverts;
427  unsigned short reg;
428  unsigned char area;
429 };
430 
434 {
436  int nconts;
437  float bmin[3];
438  float bmax[3];
439  float cs;
440  float ch;
441  int width;
442  int height;
444 };
445 
449 {
450  int nclusters;
451  float* center;
452  unsigned short* nlinks;
453  unsigned short* links;
454 };
455 
459 {
460  unsigned short* verts;
461  unsigned short* polys;
462  unsigned short* regs;
463  unsigned short* flags;
464  unsigned char* areas;
465  int nverts;
466  int npolys;
467  int maxpolys;
468  int nvp;
469  float bmin[3];
470  float bmax[3];
471  float cs;
472  float ch;
474 };
475 
480 {
481  unsigned int* meshes;
482  float* verts;
483  unsigned char* tris;
484  int nmeshes;
485  int nverts;
486  int ntris;
487 };
488 
493 
498 ATOMSUTILS_EXPORT rcHeightfield* rcAllocHeightfield();
499 
504 ATOMSUTILS_EXPORT void rcFreeHeightField(rcHeightfield* hf);
505 
511 
516 ATOMSUTILS_EXPORT void rcFreeCompactHeightfield(rcCompactHeightfield* chf);
517 
523 
528 ATOMSUTILS_EXPORT void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset);
529 
534 ATOMSUTILS_EXPORT rcContourSet* rcAllocContourSet();
535 
540 ATOMSUTILS_EXPORT void rcFreeContourSet(rcContourSet* cset);
541 
546 ATOMSUTILS_EXPORT rcClusterSet* rcAllocClusterSet();
547 
552 ATOMSUTILS_EXPORT void rcFreeClusterSet(rcClusterSet* clset);
553 
558 ATOMSUTILS_EXPORT rcPolyMesh* rcAllocPolyMesh();
559 
564 ATOMSUTILS_EXPORT void rcFreePolyMesh(rcPolyMesh* pmesh);
565 
571 
576 ATOMSUTILS_EXPORT void rcFreePolyMeshDetail(rcPolyMeshDetail* dmesh);
577 
579 
585 static const unsigned short RC_BORDER_REG = 0x8000;
586 
594 static const int RC_BORDER_VERTEX = 0x10000;
595 
601 static const int RC_AREA_BORDER = 0x20000;
602 
606 {
609 };
610 
611 
613 {
616 };
617 
618 
620 {
622 };
623 
628 static const int RC_CONTOUR_REG_MASK = 0xffff;
629 
633 static const unsigned short RC_MESH_NULL_IDX = 0xffff;
634 
638 static const unsigned char RC_NULL_AREA = 0;
639 
643 static const unsigned char RC_WALKABLE_AREA = 63;
644 
647 static const int RC_NOT_CONNECTED = 0xff;
648 
651 
655 template<class T> inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; }
656 
661 template<class T> inline T rcMin(T a, T b) { return a < b ? a : b; }
662 
667 template<class T> inline T rcMax(T a, T b) { return a > b ? a : b; }
668 
672 template<class T> inline T rcAbs(T a) { return a < 0 ? -a : a; }
673 
677 template<class T> inline T rcSqr(T a) { return a*a; }
678 
684 template<class T> inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
685 
689 float rcSqrt(float x);
690 
694 
699 inline void rcVcross(float* dest, const float* v1, const float* v2)
700 {
701  dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
702  dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
703  dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
704 }
705 
710 inline float rcVdot(const float* v1, const float* v2)
711 {
712  return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
713 }
714 
720 inline void rcVmad(float* dest, const float* v1, const float* v2, const float s)
721 {
722  dest[0] = v1[0]+v2[0]*s;
723  dest[1] = v1[1]+v2[1]*s;
724  dest[2] = v1[2]+v2[2]*s;
725 }
726 
731 inline void rcVadd(float* dest, const float* v1, const float* v2)
732 {
733  dest[0] = v1[0]+v2[0];
734  dest[1] = v1[1]+v2[1];
735  dest[2] = v1[2]+v2[2];
736 }
737 
742 inline void rcVsub(float* dest, const float* v1, const float* v2)
743 {
744  dest[0] = v1[0]-v2[0];
745  dest[1] = v1[1]-v2[1];
746  dest[2] = v1[2]-v2[2];
747 }
748 
752 inline void rcVmin(float* mn, const float* v)
753 {
754  mn[0] = rcMin(mn[0], v[0]);
755  mn[1] = rcMin(mn[1], v[1]);
756  mn[2] = rcMin(mn[2], v[2]);
757 }
758 
762 inline void rcVmax(float* mx, const float* v)
763 {
764  mx[0] = rcMax(mx[0], v[0]);
765  mx[1] = rcMax(mx[1], v[1]);
766  mx[2] = rcMax(mx[2], v[2]);
767 }
768 
772 inline void rcVcopy(float* dest, const float* v)
773 {
774  dest[0] = v[0];
775  dest[1] = v[1];
776  dest[2] = v[2];
777 }
778 
783 inline float rcVdist(const float* v1, const float* v2)
784 {
785  float dx = v2[0] - v1[0];
786  float dy = v2[1] - v1[1];
787  float dz = v2[2] - v1[2];
788  return rcSqrt(dx*dx + dy*dy + dz*dz);
789 }
790 
795 inline float rcVdistSqr(const float* v1, const float* v2)
796 {
797  float dx = v2[0] - v1[0];
798  float dy = v2[1] - v1[1];
799  float dz = v2[2] - v1[2];
800  return dx*dx + dy*dy + dz*dz;
801 }
802 
805 inline void rcVnormalize(float* v)
806 {
807  float d = 1.0f / rcSqrt(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2]));
808  v[0] *= d;
809  v[1] *= d;
810  v[2] *= d;
811 }
812 
817 
824 ATOMSUTILS_EXPORT void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax);
825 
833 ATOMSUTILS_EXPORT void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h);
834 
845 ATOMSUTILS_EXPORT bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height,
846  const float* bmin, const float* bmax,
847  float cs, float ch);
848 
855 ATOMSUTILS_EXPORT void rcResetHeightfield(rcHeightfield& hf);
856 
868 ATOMSUTILS_EXPORT void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv,
869  const int* tris, int nt, unsigned char* areas);
870 
882 ATOMSUTILS_EXPORT void rcMarkWalkableTrianglesCos(rcContext* ctx, const float walkableSlopeCos, const float* verts, int nv,
883  const int* tris, int nt, unsigned char* areas);
884 
895 ATOMSUTILS_EXPORT void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv,
896  const int* tris, int nt, unsigned char* areas);
897 
910 ATOMSUTILS_EXPORT void rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y,
911  const unsigned short smin, const unsigned short smax,
912  const unsigned char area, const int flagMergeThr);
913 
914 ATOMSUTILS_EXPORT void rcAddSpans(rcContext* ctx, rcHeightfield& hf, const int flagMergeThr,
915  const rcSpanCache* cachedSpans, const int nspans);
916 
917 ATOMSUTILS_EXPORT int rcCountSpans(rcContext* ctx, rcHeightfield& hf);
918 ATOMSUTILS_EXPORT void rcCacheSpans(rcContext* ctx, rcHeightfield& hf, rcSpanCache* cachedSpans);
919 
930 ATOMSUTILS_EXPORT void rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2,
931  const unsigned char area, rcHeightfield& solid,
932  const int flagMergeThr = 1);
933 
946 ATOMSUTILS_EXPORT void rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv,
947  const int* tris, const unsigned char* areas, const int nt,
948  rcHeightfield& solid, const int flagMergeThr = 1, const int rasterizationFlags = 0 );
949 
962 ATOMSUTILS_EXPORT void rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv,
963  const unsigned short* tris, const unsigned char* areas, const int nt,
964  rcHeightfield& solid, const int flagMergeThr = 1, const int rasterizationFlags = 0 );
965 
975 ATOMSUTILS_EXPORT void rcRasterizeTriangles(rcContext* ctx, const float* verts, const unsigned char* areas, const int nt,
976  rcHeightfield& solid, const int flagMergeThr = 1);
977 
984 ATOMSUTILS_EXPORT void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid);
985 
994 ATOMSUTILS_EXPORT void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight,
995  const int walkableClimb, rcHeightfield& solid);
996 
1003 ATOMSUTILS_EXPORT void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid);
1004 ATOMSUTILS_EXPORT void rcFilterWalkableLowHeightSpansSequences(rcContext* ctx, int walkableHeight, rcHeightfield& solid);
1005 
1011 ATOMSUTILS_EXPORT int rcGetHeightFieldSpanCount(rcContext* ctx, rcHeightfield& hf);
1012 
1017 
1028 ATOMSUTILS_EXPORT bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb,
1030 
1037 ATOMSUTILS_EXPORT bool rcErodeWalkableArea(rcContext* ctx, int radius, rcCompactHeightfield& chf);
1038 
1049 ATOMSUTILS_EXPORT bool rcErodeWalkableAndLowAreas(rcContext* ctx, int radius, unsigned int height,
1050  unsigned char areaId, unsigned char filterFlags,
1051  rcCompactHeightfield& chf);
1052 
1058 ATOMSUTILS_EXPORT bool rcMedianFilterWalkableArea(rcContext* ctx, rcCompactHeightfield& chf);
1059 
1067 ATOMSUTILS_EXPORT bool rcMarkLowAreas(rcContext* ctx, unsigned int height, unsigned char areaId, rcCompactHeightfield& chf);
1068 
1076 ATOMSUTILS_EXPORT void rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId,
1077  rcCompactHeightfield& chf);
1078 
1088 ATOMSUTILS_EXPORT void rcMarkConvexPolyArea(rcContext* ctx, const float* verts, const int nverts,
1089  const float hmin, const float hmax, unsigned char areaId,
1090  rcCompactHeightfield& chf);
1091 
1099 ATOMSUTILS_EXPORT int rcOffsetPoly(const float* verts, const int nverts, const float offset,
1100  float* outVerts, const int maxOutVerts);
1101 
1110 ATOMSUTILS_EXPORT void rcMarkCylinderArea(rcContext* ctx, const float* pos,
1111  const float r, const float h, unsigned char areaId,
1112  rcCompactHeightfield& chf);
1113 
1121 ATOMSUTILS_EXPORT void rcReplaceBoxArea(rcContext* ctx, const float* bmin, const float* bmax,
1122  unsigned char areaId, unsigned char filterAreaId,
1123  rcCompactHeightfield& chf);
1124 
1134 ATOMSUTILS_EXPORT void rcReplaceConvexPolyArea(rcContext* ctx, const float* verts, const int nverts,
1135  const float hmin, const float hmax, unsigned char areaId, unsigned char filterAreaId,
1136  rcCompactHeightfield& chf);
1137 
1146 ATOMSUTILS_EXPORT void rcReplaceCylinderArea(rcContext* ctx, const float* pos,
1147  const float r, const float h, unsigned char areaId, unsigned char filterAreaId,
1148  rcCompactHeightfield& chf);
1149 
1155 ATOMSUTILS_EXPORT bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf);
1156 
1168 ATOMSUTILS_EXPORT bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf,
1169  const int borderSize, const int minRegionArea, const int mergeRegionArea);
1170 
1182 ATOMSUTILS_EXPORT bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
1183  const int borderSize, const int minRegionArea, const int mergeRegionArea);
1184 
1197 ATOMSUTILS_EXPORT bool rcBuildRegionsChunky(rcContext* ctx, rcCompactHeightfield& chf,
1198  const int borderSize, const int minRegionArea, const int mergeRegionArea,
1199  const int chunkSize);
1200 
1205 inline void rcSetCon(rcCompactSpan& s, int dir, int i)
1206 {
1207  const unsigned int shift = (unsigned int)dir * 8;
1208  unsigned int con = s.con;
1209  s.con = (con & ~(0xff << shift)) | (((unsigned int)i & 0xff) << shift);
1210 }
1211 
1217 inline int rcGetCon(const rcCompactSpan& s, int dir)
1218 {
1219  const unsigned int shift = (unsigned int)dir * 8;
1220  return (s.con >> shift) & 0xff;
1221 }
1222 
1227 inline int rcGetDirOffsetX(int dir)
1228 {
1229  const int offset[4] = { -1, 0, 1, 0, };
1230  return offset[dir&0x03];
1231 }
1232 
1237 inline int rcGetDirOffsetY(int dir)
1238 {
1239  const int offset[4] = { 0, 1, 0, -1 };
1240  return offset[dir&0x03];
1241 }
1242 
1247 
1248 // renamed building layers to rcBuildHeightfieldLayersMonotone, added flood fill based implementation
1249 
1260 ATOMSUTILS_EXPORT bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
1261  const int borderSize, const int walkableHeight,
1262  rcHeightfieldLayerSet& lset);
1263 
1275  const int borderSize, const int walkableHeight,
1276  rcHeightfieldLayerSet& lset);
1277 
1290  const int borderSize, const int walkableHeight,
1291  const int chunkSize,
1292  rcHeightfieldLayerSet& lset);
1293 
1294 
1306 ATOMSUTILS_EXPORT bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf,
1307  const float maxError, const int maxEdgeLen,
1308  rcContourSet& cset, const int flags = RC_CONTOUR_TESS_WALL_EDGES);
1309 
1315 ATOMSUTILS_EXPORT bool rcBuildClusters(rcContext* ctx, rcContourSet& cset, rcClusterSet& clusters);
1316 
1325 ATOMSUTILS_EXPORT bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh);
1326 
1334 ATOMSUTILS_EXPORT bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
1335 
1346 ATOMSUTILS_EXPORT bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
1347  const float sampleDist, const float sampleMaxError,
1348  rcPolyMeshDetail& dmesh);
1349 
1356 ATOMSUTILS_EXPORT bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst);
1357 
1365 ATOMSUTILS_EXPORT bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
1366 
1368 
1369 }
1370 
1371 #endif // RECAST_H
1372 
1374 
1375 // Due to the large amount of detail documentation for this file,
1376 // the content normally located at the end of the header file has been separated
1377 // out to a file in /Docs/Extern.
Definition: Recast.h:113
virtual void doResetLog()
Clears all log entries.
Definition: Recast.h:156
void startTimer(const rcTimerLabel label)
Definition: Recast.h:142
rcContext(bool state=true)
Definition: Recast.h:118
void resetTimers()
Clears all peformance timers. (Resets all to unused.)
Definition: Recast.h:138
virtual void doResetTimers()
Clears all timers. (Resets all to unused.)
Definition: Recast.h:165
void enableTimer(bool state)
Definition: Recast.h:135
virtual void doStopTimer(const rcTimerLabel)
Definition: Recast.h:173
bool m_timerEnabled
True if the performance timers are enabled.
Definition: Recast.h:184
virtual void doStartTimer(const rcTimerLabel)
Definition: Recast.h:169
void enableLog(bool state)
Definition: Recast.h:123
virtual void doLog(const rcLogCategory, const char *, const int)
Definition: Recast.h:162
void log(const rcLogCategory category, const char *format,...)
virtual int doGetAccumulatedTime(const rcTimerLabel) const
Definition: Recast.h:178
int getAccumulatedTime(const rcTimerLabel label) const
Definition: Recast.h:151
bool m_logEnabled
True if logging is enabled.
Definition: Recast.h:181
void resetLog()
Clears all log entries.
Definition: Recast.h:126
void stopTimer(const rcTimerLabel label)
Definition: Recast.h:146
AtomsCore namespace.
Definition: Base64.h:13
rcTimerLabel
Definition: Recast.h:46
@ RC_TIMER_BUILD_CONTOURS_SIMPLIFY
The time to simplify the contours. (See: rcBuildContours)
Definition: Recast.h:60
@ RC_TIMER_FILTER_LOW_OBSTACLES
The time to filter low obstacles. (See: rcFilterLowHangingWalkableObstacles)
Definition: Recast.h:70
@ RC_TIMER_BUILD_POLYMESHDETAIL
The time to build the polygon mesh detail. (See: rcBuildPolyMeshDetail)
Definition: Recast.h:102
@ RC_TIMER_BUILD_DISTANCEFIELD_DIST
The time to build the distances of the distance field. (See: rcBuildDistanceField)
Definition: Recast.h:86
@ RC_TIMER_BUILD_REGIONS
The total time to build the regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition: Recast.h:90
@ RC_TIMER_ERODE_AREA
The time to erode the walkable area. (See: rcErodeWalkableArea)
Definition: Recast.h:76
@ RC_TIMER_BUILD_REGIONS_FLOOD
The time to flood regions while applying the watershed algorithm. (See: rcBuildRegions)
Definition: Recast.h:96
@ RC_TIMER_FILTER_WALKABLE
The time to filter low height spans. (See: rcFilterWalkableLowHeightSpans)
Definition: Recast.h:66
@ RC_TIMER_BUILD_DISTANCEFIELD_BLUR
The time to blur the distance field. (See: rcBuildDistanceField)
Definition: Recast.h:88
@ RC_TIMER_FILTER_BORDER
The time to filter ledge spans. (See: rcFilterLedgeSpans)
Definition: Recast.h:64
@ RC_TIMER_MARK_CONVEXPOLY_AREA
The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)
Definition: Recast.h:82
@ RC_MAX_TIMERS
The maximum number of timers. (Used for iterating timers.)
Definition: Recast.h:106
@ RC_TIMER_TEMP
A user defined build time.
Definition: Recast.h:50
@ RC_TIMER_BUILD_COMPACTHEIGHTFIELD
The time to build the compact heightfield. (See: rcBuildCompactHeightfield)
Definition: Recast.h:54
@ RC_TIMER_BUILD_REGIONS_FILTER
The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition: Recast.h:98
@ RC_TIMER_MARK_BOX_AREA
The time to mark a box area. (See: rcMarkBoxArea)
Definition: Recast.h:78
@ RC_TIMER_TOTAL
The user defined total time of the build.
Definition: Recast.h:48
@ RC_TIMER_BUILD_POLYMESH
The time to build the polygon mesh. (See: rcBuildPolyMesh)
Definition: Recast.h:72
@ RC_TIMER_RASTERIZE_TRIANGLES
The time to rasterize the triangles. (See: rcRasterizeTriangle)
Definition: Recast.h:52
@ RC_TIMER_MARK_CYLINDER_AREA
The time to mark a cylinder area. (See: rcMarkCylinderArea)
Definition: Recast.h:80
@ RC_TIMER_MERGE_POLYMESHDETAIL
The time to merge polygon mesh details. (See: rcMergePolyMeshDetails)
Definition: Recast.h:104
@ RC_TIMER_MEDIAN_AREA
The time to apply the median filter. (See: rcMedianFilterWalkableArea)
Definition: Recast.h:68
@ RC_TIMER_BUILD_REGIONS_WATERSHED
The total time to apply the watershed algorithm. (See: rcBuildRegions)
Definition: Recast.h:92
@ RC_TIMER_MERGE_POLYMESH
The time to merge polygon meshes. (See: rcMergePolyMeshes)
Definition: Recast.h:74
@ RC_TIMER_BUILD_CONTOURS
The total time to build the contours. (See: rcBuildContours)
Definition: Recast.h:56
@ RC_TIMER_BUILD_CONTOURS_TRACE
The time to trace the boundaries of the contours. (See: rcBuildContours)
Definition: Recast.h:58
@ RC_TIMER_BUILD_LAYERS
The time to build heightfield layers. (See: rcBuildHeightfieldLayers)
Definition: Recast.h:100
@ RC_TIMER_BUILD_DISTANCEFIELD
The total time to build the distance field. (See: rcBuildDistanceField)
Definition: Recast.h:84
@ RC_TIMER_BUILD_REGIONS_EXPAND
The time to expand regions while applying the watershed algorithm. (See: rcBuildRegions)
Definition: Recast.h:94
@ RC_TIMER_BUILD_CLUSTERS
The time to link clusters from contours. (See: rcBuildClusters)
Definition: Recast.h:62
void rcVmin(float *mn, const float *v)
Definition: Recast.h:752
ATOMSUTILS_EXPORT void rcFreeCompactHeightfield(rcCompactHeightfield *chf)
ATOMSUTILS_EXPORT bool rcErodeWalkableAndLowAreas(rcContext *ctx, int radius, unsigned int height, unsigned char areaId, unsigned char filterFlags, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcFreeClusterSet(rcClusterSet *clset)
T rcMin(T a, T b)
Definition: Recast.h:661
ATOMSUTILS_EXPORT void rcMarkCylinderArea(rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcMarkBoxArea(rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT rcCompactHeightfield * rcAllocCompactHeightfield()
ATOMSUTILS_EXPORT rcHeightfield * rcAllocHeightfield()
float rcVdistSqr(const float *v1, const float *v2)
Definition: Recast.h:795
ATOMSUTILS_EXPORT bool rcBuildRegionsMonotone(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
void rcVnormalize(float *v)
Definition: Recast.h:805
T rcSqr(T a)
Definition: Recast.h:677
ATOMSUTILS_EXPORT bool rcMergePolyMeshDetails(rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
float rcVdist(const float *v1, const float *v2)
Definition: Recast.h:783
ATOMSUTILS_EXPORT bool rcBuildClusters(rcContext *ctx, rcContourSet &cset, rcClusterSet &clusters)
ATOMSUTILS_EXPORT rcClusterSet * rcAllocClusterSet()
ATOMSUTILS_EXPORT void rcFilterLowHangingWalkableObstacles(rcContext *ctx, const int walkableClimb, rcHeightfield &solid)
ATOMSUTILS_EXPORT bool rcCopyPolyMesh(rcContext *ctx, const rcPolyMesh &src, rcPolyMesh &dst)
float rcVdot(const float *v1, const float *v2)
Definition: Recast.h:710
rcFilterLowAreaFlags
Definition: Recast.h:613
@ RC_LOW_FILTER_SEED_SPANS
initial seeding on spans
Definition: Recast.h:614
@ RC_LOW_FILTER_POST_PROCESS
additional filtering at the end
Definition: Recast.h:615
ATOMSUTILS_EXPORT void rcFreeContourSet(rcContourSet *cset)
ATOMSUTILS_EXPORT bool rcBuildPolyMeshDetail(rcContext *ctx, const rcPolyMesh &mesh, const rcCompactHeightfield &chf, const float sampleDist, const float sampleMaxError, rcPolyMeshDetail &dmesh)
T rcAbs(T a)
Definition: Recast.h:672
ATOMSUTILS_EXPORT void rcClearUnwalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
ATOMSUTILS_EXPORT void rcCalcGridSize(const float *bmin, const float *bmax, float cs, int *w, int *h)
void rcVmax(float *mx, const float *v)
Definition: Recast.h:762
ATOMSUTILS_EXPORT void rcReplaceConvexPolyArea(rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcResetHeightfield(rcHeightfield &hf)
rcRasterizationFlags
Definition: Recast.h:620
@ RC_PROJECT_TO_BOTTOM
Will create spans from the triangle surface to the bottom of the heightfield.
Definition: Recast.h:621
ATOMSUTILS_EXPORT void rcReplaceBoxArea(rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcFilterLedgeSpans(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &solid)
float rcSqrt(float x)
ATOMSUTILS_EXPORT bool rcMedianFilterWalkableArea(rcContext *ctx, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcMarkConvexPolyArea(rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT void rcCalcBounds(const float *verts, int nv, float *bmin, float *bmax)
ATOMSUTILS_EXPORT void rcRasterizeTriangle(rcContext *ctx, const float *v0, const float *v1, const float *v2, const unsigned char area, rcHeightfield &solid, const int flagMergeThr=1)
ATOMSUTILS_EXPORT void rcMarkWalkableTrianglesCos(rcContext *ctx, const float walkableSlopeCos, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
void rcVcross(float *dest, const float *v1, const float *v2)
Definition: Recast.h:699
ATOMSUTILS_EXPORT bool rcBuildHeightfieldLayersChunky(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int walkableHeight, const int chunkSize, rcHeightfieldLayerSet &lset)
ATOMSUTILS_EXPORT rcPolyMesh * rcAllocPolyMesh()
ATOMSUTILS_EXPORT bool rcMergePolyMeshes(rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
ATOMSUTILS_EXPORT void rcFreePolyMeshDetail(rcPolyMeshDetail *dmesh)
ATOMSUTILS_EXPORT void rcMarkWalkableTriangles(rcContext *ctx, const float walkableSlopeAngle, const float *verts, int nv, const int *tris, int nt, unsigned char *areas)
ATOMSUTILS_EXPORT bool rcBuildHeightfieldLayersMonotone(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
ATOMSUTILS_EXPORT bool rcMarkLowAreas(rcContext *ctx, unsigned int height, unsigned char areaId, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT bool rcBuildCompactHeightfield(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &hf, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT bool rcBuildDistanceField(rcContext *ctx, rcCompactHeightfield &chf)
void rcVmad(float *dest, const float *v1, const float *v2, const float s)
Definition: Recast.h:720
void rcVcopy(float *dest, const float *v)
Definition: Recast.h:772
ATOMSUTILS_EXPORT bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
ATOMSUTILS_EXPORT rcContourSet * rcAllocContourSet()
ATOMSUTILS_EXPORT void rcFreePolyMesh(rcPolyMesh *pmesh)
rcBuildContoursFlags
Definition: Recast.h:606
@ RC_CONTOUR_TESS_AREA_EDGES
Tessellate edges between areas during contour simplification.
Definition: Recast.h:608
@ RC_CONTOUR_TESS_WALL_EDGES
Tessellate solid (impassable) edges during contour simplification.
Definition: Recast.h:607
ATOMSUTILS_EXPORT 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)
ATOMSUTILS_EXPORT bool rcBuildContours(rcContext *ctx, rcCompactHeightfield &chf, const float maxError, const int maxEdgeLen, rcContourSet &cset, const int flags=RC_CONTOUR_TESS_WALL_EDGES)
T rcClamp(T v, T mn, T mx)
Definition: Recast.h:684
int rcGetDirOffsetX(int dir)
Definition: Recast.h:1227
ATOMSUTILS_EXPORT rcPolyMeshDetail * rcAllocPolyMeshDetail()
ATOMSUTILS_EXPORT void rcFilterWalkableLowHeightSpans(rcContext *ctx, int walkableHeight, rcHeightfield &solid)
void rcSwap(T &a, T &b)
Definition: Recast.h:655
ATOMSUTILS_EXPORT int rcGetHeightFieldSpanCount(rcContext *ctx, rcHeightfield &hf)
ATOMSUTILS_EXPORT bool rcBuildPolyMesh(rcContext *ctx, rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
void rcSetCon(rcCompactSpan &s, int dir, int i)
Definition: Recast.h:1205
ATOMSUTILS_EXPORT void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet *lset)
void rcVadd(float *dest, const float *v1, const float *v2)
Definition: Recast.h:731
rcLogCategory
Definition: Recast.h:37
@ RC_LOG_WARNING
A warning log entry.
Definition: Recast.h:39
@ RC_LOG_ERROR
An error log entry.
Definition: Recast.h:40
@ RC_LOG_PROGRESS
A progress log entry.
Definition: Recast.h:38
ATOMSUTILS_EXPORT void rcFreeHeightField(rcHeightfield *hf)
ATOMSUTILS_EXPORT bool rcBuildRegionsChunky(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea, const int chunkSize)
T rcMax(T a, T b)
Definition: Recast.h:667
int rcGetCon(const rcCompactSpan &s, int dir)
Definition: Recast.h:1217
ATOMSUTILS_EXPORT bool rcCreateHeightfield(rcContext *ctx, rcHeightfield &hf, int width, int height, const float *bmin, const float *bmax, float cs, float ch)
ATOMSUTILS_EXPORT bool rcErodeWalkableArea(rcContext *ctx, int radius, rcCompactHeightfield &chf)
ATOMSUTILS_EXPORT rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet()
ATOMSUTILS_EXPORT 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, const int rasterizationFlags=0)
rcRegionPartitioning
Definition: Recast.h:190
@ RC_REGION_WATERSHED
watershed partitioning
Definition: Recast.h:192
@ RC_REGION_CHUNKY
monotone partitioning on small chunks
Definition: Recast.h:193
@ RC_REGION_MONOTONE
monotone partitioning
Definition: Recast.h:191
ATOMSUTILS_EXPORT bool rcBuildHeightfieldLayers(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
void rcVsub(float *dest, const float *v1, const float *v2)
Definition: Recast.h:742
ATOMSUTILS_EXPORT void rcReplaceCylinderArea(rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
int rcGetDirOffsetY(int dir)
Definition: Recast.h:1237
ATOMSUTILS_EXPORT int rcOffsetPoly(const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts)
Definition: Recast.h:449
float * center
Center points per clusters [Size: 3 * nclusters].
Definition: Recast.h:451
int nclusters
The number of clusters.
Definition: Recast.h:450
unsigned short * nlinks
Number of links per cluster [Size: nclusters].
Definition: Recast.h:452
unsigned short * links
Neighbor Ids per cluster [Size: sum of nlinks].
Definition: Recast.h:453
Provides information on the content of a cell column in a compact heightfield.
Definition: Recast.h:354
unsigned int index
Index to the first span in the column.
Definition: Recast.h:355
unsigned int count
Number of spans in the column.
Definition: Recast.h:356
Definition: Recast.h:371
unsigned char * areas
Array containing area id data. [Size: spanCount].
Definition: Recast.h:387
unsigned short maxRegions
The maximum region id of any span within the field.
Definition: Recast.h:379
int spanCount
The number of spans in the heightfield.
Definition: Recast.h:374
int walkableClimb
The walkable climb used during the build of the field. (See: rcConfig::walkableClimb)
Definition: Recast.h:376
int borderSize
The AABB border size used during the build of the field. (See: rcConfig::borderSize)
Definition: Recast.h:377
rcCompactCell * cells
Array of cells. [Size: width*height].
Definition: Recast.h:384
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:382
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:381
rcCompactSpan * spans
Array of spans. [Size: spanCount].
Definition: Recast.h:385
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:383
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:380
int walkableHeight
The walkable height used during the build of the field. (See: rcConfig::walkableHeight)
Definition: Recast.h:375
unsigned short maxDistance
The maximum distance value of any span within the field.
Definition: Recast.h:378
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:372
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:373
unsigned short * dist
Array containing border distance data. [Size: spanCount].
Definition: Recast.h:386
Represents a span of unobstructed space within a compact heightfield.
Definition: Recast.h:361
unsigned char h
The height of the span. (Measured from y.)
Definition: Recast.h:365
unsigned short y
The lower extent of the span. (Measured from the heightfield's base.)
Definition: Recast.h:362
unsigned short reg
The id of the region the span belongs to. (Or zero if not in a region.)
Definition: Recast.h:363
unsigned int con
Packed neighbor connection data.
Definition: Recast.h:364
Definition: Recast.h:199
int maxEdgeLen
The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx].
Definition: Recast.h:239
int walkableClimb
Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx].
Definition: Recast.h:232
float detailSampleDist
Definition: Recast.h:264
int minRegionArea
The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx].
Definition: Recast.h:246
float bmin[3]
The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition: Recast.h:219
int width
The width of the field along the x-axis. [Limit: >= 0] [Units: vx].
Definition: Recast.h:201
int regionPartitioning
Region partitioning method: creating poly mesh.
Definition: Recast.h:256
float maxSimplificationError
Definition: Recast.h:243
int walkableHeight
Definition: Recast.h:229
float bmax[3]
The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition: Recast.h:222
float cs
The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu].
Definition: Recast.h:213
int height
The height of the field along the z-axis. [Limit: >= 0] [Units: vx].
Definition: Recast.h:204
int borderSize
The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx].
Definition: Recast.h:210
int walkableRadius
Definition: Recast.h:236
int regionChunkSize
Size of region chunk [Units: vx].
Definition: Recast.h:253
int mergeRegionArea
Definition: Recast.h:250
int tileSize
The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx].
Definition: Recast.h:207
float ch
The y-axis cell size to use for fields. [Limit: > 0] [Units: wu].
Definition: Recast.h:216
float detailSampleMaxError
Definition: Recast.h:268
int maxVertsPerPoly
Definition: Recast.h:260
float walkableSlopeAngle
The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees].
Definition: Recast.h:225
Represents a simple, non-overlapping contour in field space.
Definition: Recast.h:422
unsigned short reg
The region id of the contour.
Definition: Recast.h:427
int nrverts
The number of vertices in the raw contour.
Definition: Recast.h:426
unsigned char area
The area id of the contour.
Definition: Recast.h:428
int * rverts
Raw contour vertex and connection data. [Size: 4 * nrverts].
Definition: Recast.h:425
int nverts
The number of vertices in the simplified contour.
Definition: Recast.h:424
int * verts
Simplified contour vertex and connection data. [Size: 4 * nverts].
Definition: Recast.h:423
Definition: Recast.h:434
int borderSize
The AABB border size used to generate the source data from which the contours were derived.
Definition: Recast.h:443
int height
The height of the set. (Along the z-axis in cell units.)
Definition: Recast.h:442
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:438
int nconts
The number of contours in the set.
Definition: Recast.h:436
int width
The width of the set. (Along the x-axis in cell units.)
Definition: Recast.h:441
rcContour * conts
An array of the contours in the set. [Size: nconts].
Definition: Recast.h:435
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:437
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:440
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:439
Definition: Recast.h:322
Definition: Recast.h:334
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:337
rcTempSpan * tempspans
Heightfield of temp spans (width*height).
Definition: Recast.h:348
rcRowExt * RowExt
h structs that give the current x range for this z row
Definition: Recast.h:347
rcEdgeHit * EdgeHits
h + 1 bit flags that indicate what edges cross the z cell boundaries
Definition: Recast.h:346
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:335
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:336
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:339
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:340
rcSpan ** spans
Heightfield of spans (width*height).
Definition: Recast.h:341
rcSpanPool * pools
Linked list of span pools.
Definition: Recast.h:342
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:338
rcSpan * freelist
The next free span.
Definition: Recast.h:343
Definition: Recast.h:393
int minx
The minimum x-bounds of usable data.
Definition: Recast.h:400
unsigned char * areas
Area ids. [Size: Same as heights].
Definition: Recast.h:407
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition: Recast.h:398
unsigned short * heights
The heightfield. [Size: (width - borderSize*2) * (h - borderSize*2)].
Definition: Recast.h:406
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:397
int maxx
The maximum x-bounds of usable data.
Definition: Recast.h:401
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:394
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition: Recast.h:399
int hmax
The maximum height bounds of usable data. (Along the y-axis.)
Definition: Recast.h:405
int maxy
The maximum y-bounds of usable data. (Along the z-axis.)
Definition: Recast.h:403
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:396
unsigned char * cons
Packed neighbor connection information. [Size: Same as heights].
Definition: Recast.h:408
int hmin
The minimum height bounds of usable data. (Along the y-axis.)
Definition: Recast.h:404
int miny
The minimum y-bounds of usable data. (Along the z-axis.)
Definition: Recast.h:402
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:395
Definition: Recast.h:415
rcHeightfieldLayer * layers
The layers in the set. [Size: nlayers].
Definition: Recast.h:416
int nlayers
The number of layers in the set.
Definition: Recast.h:417
Definition: Recast.h:480
float * verts
The mesh vertices. [Size: 3*nverts].
Definition: Recast.h:482
unsigned int * meshes
The sub-mesh data. [Size: 4*nmeshes].
Definition: Recast.h:481
int nmeshes
The number of sub-meshes defined by meshes.
Definition: Recast.h:484
unsigned char * tris
The mesh triangles. [Size: 4*ntris].
Definition: Recast.h:483
int ntris
The number of triangles in tris.
Definition: Recast.h:486
int nverts
The number of vertices in verts.
Definition: Recast.h:485
Definition: Recast.h:459
float cs
The size of each cell. (On the xz-plane.)
Definition: Recast.h:471
unsigned short * flags
The user defined flags for each polygon. [Length: maxpolys].
Definition: Recast.h:463
unsigned char * areas
The area id assigned to each polygon. [Length: maxpolys].
Definition: Recast.h:464
unsigned short * verts
The mesh vertices. [Form: (x, y, z) * nverts].
Definition: Recast.h:460
int nverts
The number of vertices.
Definition: Recast.h:465
float bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition: Recast.h:470
int borderSize
The AABB border size used to generate the source data from which the mesh was derived.
Definition: Recast.h:473
int npolys
The number of polygons.
Definition: Recast.h:466
unsigned short * polys
Polygon and neighbor data. [Length: maxpolys * 2 * nvp].
Definition: Recast.h:461
int maxpolys
The number of allocated polygons.
Definition: Recast.h:467
float ch
The height of each cell. (The minimum increment along the y-axis.)
Definition: Recast.h:472
int nvp
The maximum number of vertices per polygon.
Definition: Recast.h:468
float bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition: Recast.h:469
unsigned short * regs
The region id assigned to each polygon. [Length: maxpolys].
Definition: Recast.h:462
Definition: Recast.h:317
Definition: Recast.h:290
Definition: Recast.h:283
unsigned int area
The area id assigned to the span.
Definition: Recast.h:286
unsigned int smin
The lower limit of the span. [Limit: < smax].
Definition: Recast.h:284
unsigned int smax
The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT].
Definition: Recast.h:285
Definition: Recast.h:299
rcSpanData data
Span data.
Definition: Recast.h:300
rcSpan * next
The next span higher up in column.
Definition: Recast.h:301
Definition: Recast.h:307
rcSpan items[RC_SPANS_PER_POOL]
Array of spans in the pool.
Definition: Recast.h:309
rcSpanPool * next
The next span pool.
Definition: Recast.h:308
Definition: Recast.h:326
short int sminmax[2]
The lower and upper limit of the span. [Limit: < #smax].
Definition: Recast.h:327