UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Recast.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// Modified version of Recast/Detour's source file
3
4//
5// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10// Permission is granted to anyone to use this software for any purpose,
11// including commercial applications, and to alter it and redistribute it
12// freely, subject to the following restrictions:
13// 1. The origin of this software must not be misrepresented; you must not
14// claim that you wrote the original software. If you use this software
15// in a product, an acknowledgment in the product documentation would be
16// appreciated but is not required.
17// 2. Altered source versions must be plainly marked as such, and must not be
18// misrepresented as being the original software.
19// 3. This notice may not be removed or altered from any source distribution.
20//
21
22#ifndef RECAST_H
23#define RECAST_H
24
25#include "CoreMinimal.h"
26#include "Logging/LogMacros.h"
28
29//@UE BEGIN Adding support for LWCoords.
31static const rcReal RC_PI = 3.14159265358979323846;
32
33inline float rcSin(float x)
34{
35 return sinf(x);
36}
37
38inline double rcSin(double x)
39{
40 return sin(x);
41}
42
43inline float rcCos(float x)
44{
45 return cosf(x);
46}
47
48inline double rcCos(double x)
49{
50 return cos(x);
51}
52
53inline float rcFloor(float x)
54{
55 return floorf(x);
56}
57
58inline double rcFloor(double x)
59{
60 return floor(x);
61}
62
63inline float rcCeil(float x)
64{
65 return ceilf(x);
66}
67
68inline double rcCeil(double x)
69{
70 return ceil(x);
71}
72
73inline float rcAbs(float x)
74{
75 return fabsf(x);
76}
77
78inline double rcAbs(double x)
79{
80 return fabs(x);
81}
82//@UE END Adding support for LWCoords.
83
92
158
160
165{
166public:
167
170 inline rcContext(bool state = true) : m_logEnabled(state), m_timerEnabled(state) {}
171 virtual ~rcContext() {}
172
175 inline void enableLog(bool state) { m_logEnabled = state; }
176
178 inline void resetLog() { if (m_logEnabled) doResetLog(); }
179
183 NAVMESH_API void log(const rcLogCategory category, const char* format, ...);
184
187 inline void enableTimer(bool state) { m_timerEnabled = state; }
188
190 inline void resetTimers() { if (m_timerEnabled) doResetTimers(); }
191
195
199
204
205protected:
206
208 virtual void doResetLog() {}
209
214 virtual void doLog(const rcLogCategory /*category*/, const char* /*msg*/, const int /*len*/) {}
215
217 virtual void doResetTimers() {}
218
221 virtual void doStartTimer(const rcTimerLabel /*label*/) {}
222
225 virtual void doStopTimer(const rcTimerLabel /*label*/) {}
226
230 virtual int doGetAccumulatedTime(const rcTimerLabel /*label*/) const { return -1; }
231
234
237};
238
247
248//@UE BEGIN
251{
252 int low;
253 int high;
254};
255//@UE END
256
338
343static constexpr int RC_SPAN_HEIGHT_BITS = 29; // UE
344
346static const int RC_SPAN_MAX_HEIGHT = (1<<RC_SPAN_HEIGHT_BITS)-1;
347
350static const int RC_SPANS_PER_POOL = 2048;
351
352typedef unsigned int rcSpanUInt;
353
357{
358 rcSpanUInt smin : RC_SPAN_HEIGHT_BITS;
359 rcSpanUInt smax : RC_SPAN_HEIGHT_BITS;
360 unsigned int area : 6;
361};
362
364{
365 unsigned short x;
366 unsigned short y;
368};
369
377
381{
383 rcSpan items[RC_SPANS_PER_POOL];
384};
385
386
387#define EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER 1
388
389#if EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
391{
394};
396{
397 unsigned char Hits[2];
398};
400{
401 int sminmax[2];
402};
403#endif // EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
404
408{
409 int width;
410 int height;
418
419#if EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
424#endif // EPIC_ADDITION_USE_NEW_RECAST_RASTERIZER
425
426};
427
430{
431 unsigned int index : 24;
432 unsigned int count : 8;
433};
434
437{
439 unsigned int con;
440 unsigned short reg;
441 unsigned char h;
442};
443
465
469{
474 int width;
475 int height;
476 int minx;
477 int maxx;
478 int miny;
479 int maxy;
480 int hmin;
481 int hmax;
482 unsigned short* heights;
483 unsigned char* areas;
484 unsigned char* cons;
485};
486
495
498{
499 int* verts;
500 int nverts;
501 int* rverts;
503 unsigned short reg;
504 unsigned char area;
505};
506
521
522// @UE BEGIN
523#if WITH_NAVMESH_CLUSTER_LINKS
526struct rcClusterSet
527{
528 int nclusters;
529 rcReal* center;
530 unsigned short* nlinks;
531 unsigned short* links;
532};
533#endif // WITH_NAVMESH_CLUSTER_LINKS
534// @UE END
535
539{
540 unsigned short* verts;
541 unsigned short* polys;
542 unsigned short* regs;
543 unsigned short* flags;
544 unsigned char* areas;
545 int nverts;
546 int npolys;
548 int nvp;
554};
555
560{
561 unsigned int* meshes;
563 unsigned char* tris;
565 int nverts;
566 int ntris;
567};
568
573
579
585
591
597
603
609
615
621
622// @UE BEGIN
623#if WITH_NAVMESH_CLUSTER_LINKS
629
635#endif // WITH_NAVMESH_CLUSTER_LINKS
636// @UE END
637
643
649
655
661
663
669static const unsigned short RC_BORDER_REG = 0x8000;
670
678static const int RC_BORDER_VERTEX = 0x10000;
679
685static const int RC_AREA_BORDER = 0x20000;
686
694
695// UE
701
702// UE
708
709// UE
711{
712 RC_SLOPE_FILTER_RECAST, // Use walkableClimb value to filter
713 RC_SLOPE_FILTER_NONE, // Skip slope filtering
714 RC_SLOPE_FILTER_USE_HEIGHT_FROM_WALKABLE_SLOPE // Use maximum step height computed from walkableSlopeAngle
716
721static const int RC_CONTOUR_REG_MASK = 0xffff;
722
726static const unsigned short RC_MESH_NULL_IDX = 0xffff;
727
731static const unsigned char RC_NULL_AREA = 0;
732
736static const unsigned char RC_WALKABLE_AREA = 63;
737
740static const int RC_NOT_CONNECTED = 0xff;
741
744
748template<class T> inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; }
749
754template<class T> inline T rcMin(T a, T b) { return a < b ? a : b; }
756inline rcReal rcMin(rcReal a, rcReal b) { return rcMin<rcReal>(a, b); }
757
762template<class T> inline T rcMax(T a, T b) { return a > b ? a : b; }
764inline rcReal rcMax(rcReal a, rcReal b) { return rcMax<rcReal>(a, b); }
765
769template<class T> inline T rcAbs(T a) { return a < 0 ? -a : a; }
770
774template<class T> inline T rcSqr(T a) { return a*a; }
775
781template<class T> inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
783inline rcReal rcClamp(rcReal v, rcReal mn, rcReal mx) { return v < mn ? mn : (v > mx ? mx : v); }
784
789
793
798inline void rcVcross(rcReal* dest, const rcReal* v1, const rcReal* v2)
799{
800 dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
801 dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
802 dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
803}
804
809inline rcReal rcVdot(const rcReal* v1, const rcReal* v2)
810{
811 return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
812}
813
819inline void rcVmad(rcReal* dest, const rcReal* v1, const rcReal* v2, const rcReal s)
820{
821 dest[0] = v1[0]+v2[0]*s;
822 dest[1] = v1[1]+v2[1]*s;
823 dest[2] = v1[2]+v2[2]*s;
824}
825
830inline void rcVadd(rcReal* dest, const rcReal* v1, const rcReal* v2)
831{
832 dest[0] = v1[0]+v2[0];
833 dest[1] = v1[1]+v2[1];
834 dest[2] = v1[2]+v2[2];
835}
836
841inline void rcVsub(rcReal* dest, const rcReal* v1, const rcReal* v2)
842{
843 dest[0] = v1[0]-v2[0];
844 dest[1] = v1[1]-v2[1];
845 dest[2] = v1[2]-v2[2];
846}
847
851inline void rcVmin(rcReal* mn, const rcReal* v)
852{
853 mn[0] = rcMin(mn[0], v[0]);
854 mn[1] = rcMin(mn[1], v[1]);
855 mn[2] = rcMin(mn[2], v[2]);
856}
857
861inline void rcVmax(rcReal* mx, const rcReal* v)
862{
863 mx[0] = rcMax(mx[0], v[0]);
864 mx[1] = rcMax(mx[1], v[1]);
865 mx[2] = rcMax(mx[2], v[2]);
866}
867
871inline void rcVcopy(rcReal* dest, const rcReal* v)
872{
873 dest[0] = v[0];
874 dest[1] = v[1];
875 dest[2] = v[2];
876}
877
882inline rcReal rcVdist(const rcReal* v1, const rcReal* v2)
883{
884 rcReal dx = v2[0] - v1[0];
885 rcReal dy = v2[1] - v1[1];
886 rcReal dz = v2[2] - v1[2];
887 return rcSqrt(dx*dx + dy*dy + dz*dz);
888}
889
894inline rcReal rcVdistSqr(const rcReal* v1, const rcReal* v2)
895{
896 rcReal dx = v2[0] - v1[0];
897 rcReal dy = v2[1] - v1[1];
898 rcReal dz = v2[2] - v1[2];
899 return dx*dx + dy*dy + dz*dz;
900}
901
904inline void rcVnormalize(rcReal* v)
905{
906 rcReal d = 1.0f / rcSqrt(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2]));
907 v[0] *= d;
908 v[1] *= d;
909 v[2] *= d;
910}
911
912//@UE BEGIN
920NAVMESH_API void rcCalcTriNormals(const rcReal* verts, const int nv, const int* tris, const int nt, rcReal* norms);
921//@UE END
922
927
934NAVMESH_API void rcCalcBounds(const rcReal* verts, int nv, rcReal* bmin, rcReal* bmax);
935
943NAVMESH_API void rcCalcGridSize(const rcReal* bmin, const rcReal* bmax, rcReal cs, int* w, int* h);
944
956NAVMESH_API bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height,
957 const rcReal* bmin, const rcReal* bmax,
958 rcReal cs, rcReal ch,
959 bool bAllocateTempSpanColumns = false); //UE
960
968
980NAVMESH_API void rcMarkWalkableTriangles(rcContext* ctx, const rcReal walkableSlopeAngle, const rcReal* verts, int nv,
981 const int* tris, int nt, unsigned char* areas);
982
995 const int* tris, int nt, unsigned char* areas);
996
1007NAVMESH_API void rcClearUnwalkableTriangles(rcContext* ctx, const rcReal walkableSlopeAngle, const rcReal* verts, int nv,
1008 const int* tris, int nt, unsigned char* areas);
1009
1022NAVMESH_API void rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y,
1023 const unsigned short smin, const unsigned short smax,
1024 const unsigned char area, const int flagMergeThr);
1025
1027 const rcSpanCache* cachedSpans, const int nspans);
1028
1031
1044NAVMESH_API void rcRasterizeTriangle(rcContext* ctx, const rcReal* v0, const rcReal* v1, const rcReal* v2,
1045 const unsigned char area, rcHeightfield& solid,
1046 const int flagMergeThr = 1,
1047 const int rasterizationFlags = 0, const int* rasterizationMasks = nullptr); //UE
1048
1064NAVMESH_API void rcRasterizeTriangles(rcContext* ctx, const rcReal* verts, const int nv,
1065 const int* tris, const unsigned char* areas, const int nt,
1066 rcHeightfield& solid, const int flagMergeThr = 1,
1067 const int rasterizationFlags = 0, const int* rasterizationMasks = nullptr, //UE
1068 const rcReal* vertsbmin = nullptr, const rcReal* vertsbmax = nullptr); //UE
1069
1085NAVMESH_API void rcRasterizeTriangles(rcContext* ctx, const rcReal* verts, const int nv,
1086 const unsigned short* tris, const unsigned char* areas, const int nt,
1087 rcHeightfield& solid, const int flagMergeThr = 1,
1088 const int rasterizationFlags = 0, const int* rasterizationMasks = nullptr, //UE
1089 const rcReal* vertsbmin = nullptr, const rcReal* vertsbmax = nullptr); //UE
1090
1104NAVMESH_API void rcRasterizeTriangles(rcContext* ctx, const rcReal* verts, const unsigned char* areas, const int nt,
1105 rcHeightfield& solid, const int flagMergeThr = 1,
1106 const int rasterizationFlags = 0, const int* rasterizationMasks = nullptr, //UE
1107 const rcReal* vertsbmin = nullptr, const rcReal* vertsbmax = nullptr); //UE
1108
1116
1129NAVMESH_API void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walkableClimb,
1130 const rcNeighborSlopeFilterMode neighborSlopeFilterMode, const rcReal maxStepFromWalkableSlope, const rcReal ch, const int yStart, const int maxYProcess, rcHeightfield& solid); //UE
1131
1142NAVMESH_API void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walkableClimb,
1143 const rcNeighborSlopeFilterMode neighborSlopeFilterMode, const rcReal maxStepFromWalkableSlope, const rcReal ch, rcHeightfield& solid); //UE
1144
1153
1160
1165
1176NAVMESH_API bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb,
1178
1186
1197NAVMESH_API bool rcErodeWalkableAndLowAreas(rcContext* ctx, int radius, unsigned int height,
1198 unsigned char areaId, unsigned char filterFlags,
1200
1207
1215NAVMESH_API bool rcMarkLowAreas(rcContext* ctx, unsigned int height, unsigned char areaId, rcCompactHeightfield& chf);
1216
1224NAVMESH_API void rcMarkBoxArea(rcContext* ctx, const rcReal* bmin, const rcReal* bmax, unsigned char areaId,
1226
1236NAVMESH_API void rcMarkConvexPolyArea(rcContext* ctx, const rcReal* verts, const int nverts,
1237 const rcReal hmin, const rcReal hmax, unsigned char areaId,
1239
1247NAVMESH_API int rcOffsetPoly(const rcReal* verts, const int nverts, const rcReal offset,
1248 rcReal* outVerts, const int maxOutVerts);
1249
1258NAVMESH_API void rcMarkCylinderArea(rcContext* ctx, const rcReal* pos,
1259 const rcReal r, const rcReal h, unsigned char areaId,
1261
1269NAVMESH_API void rcReplaceBoxArea(rcContext* ctx, const rcReal* bmin, const rcReal* bmax,
1270 unsigned char areaId, unsigned char filterAreaId,
1272
1282NAVMESH_API void rcReplaceConvexPolyArea(rcContext* ctx, const rcReal* verts, const int nverts,
1283 const rcReal hmin, const rcReal hmax, unsigned char areaId, unsigned char filterAreaId,
1285
1295 const rcReal r, const rcReal h, unsigned char areaId, unsigned char filterAreaId,
1297
1304
1317 const int borderSize, const int minRegionArea, const int mergeRegionArea);
1318
1331 const rcBorderSize borderSize, const int minRegionArea, const int mergeRegionArea); //@UE
1332
1346 const rcBorderSize borderSize, const int minRegionArea, const int mergeRegionArea, //@UE
1347 const int chunkSize);
1348
1353inline void rcSetCon(rcCompactSpan& s, int dir, int i)
1354{
1355 const unsigned int shift = (unsigned int)dir * 8;
1356 unsigned int con = s.con;
1357 s.con = (con & ~(0xff << shift)) | (((unsigned int)i & 0xff) << shift);
1358}
1359
1365inline int rcGetCon(const rcCompactSpan& s, int dir)
1366{
1367 const unsigned int shift = (unsigned int)dir * 8;
1368 return (s.con >> shift) & 0xff;
1369}
1370
1375inline int rcGetDirOffsetX(int dir)
1376{
1377 const int offset[4] = { -1, 0, 1, 0, };
1378 return offset[dir&0x03];
1379}
1380
1385inline int rcGetDirOffsetY(int dir)
1386{
1387 const int offset[4] = { 0, 1, 0, -1 };
1388 return offset[dir&0x03];
1389}
1390
1395
1396// @UE BEGIN: renamed building layers to rcBuildHeightfieldLayersMonotone, added flood fill based implementation
1397
1409 const rcBorderSize borderSize, const int walkableHeight, //@UE
1411
1423 const rcBorderSize borderSize, const int walkableHeight, //@UE
1425
1438 const rcBorderSize borderSize, const int walkableHeight, //@UE
1439 const int chunkSize,
1441
1442// @UE END
1443
1456 const rcReal maxError, const int maxEdgeLen,
1457 rcContourSet& cset, const int flags = RC_CONTOUR_TESS_WALL_EDGES);
1458
1459//@UE BEGIN
1460#if WITH_NAVMESH_CLUSTER_LINKS
1467#endif // WITH_NAVMESH_CLUSTER_LINKS
1468//@UE END
1469
1479
1487NAVMESH_API bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
1488
1502
1510
1518NAVMESH_API bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
1519
1521
1522#endif // RECAST_H
1523
1525
1526// Due to the large amount of detail documentation for this file,
1527// the content normally located at the end of the header file has been separated
1528// out to a file in /Docs/Extern.
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
double rcReal
Definition RecastLargeWorldCoordinates.h:16
NAVMESH_API bool rcBuildCompactHeightfield(rcContext *ctx, const int walkableHeight, const int walkableClimb, rcHeightfield &hf, rcCompactHeightfield &chf)
Definition Recast.cpp:445
float rcCeil(float x)
Definition Recast.h:63
int rcGetDirOffsetX(int dir)
Definition Recast.h:1375
NAVMESH_API void rcReplaceConvexPolyArea(rcContext *ctx, const rcReal *verts, const int nverts, const rcReal hmin, const rcReal hmax, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:1084
rcTimerLabel
Definition Recast.h:96
@ RC_TIMER_BUILD_REGIONS_FILTER
The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition Recast.h:148
@ RC_TIMER_BUILD_POLYMESHDETAIL
The time to build the polygon mesh detail. (See: rcBuildPolyMeshDetail)
Definition Recast.h:152
@ RC_TIMER_BUILD_CLUSTERS
The time to link clusters from contours. (See: #rcBuildClusters)
Definition Recast.h:112
@ RC_TIMER_MERGE_POLYMESH
The time to merge polygon meshes. (See: rcMergePolyMeshes)
Definition Recast.h:124
@ RC_TIMER_MERGE_POLYMESHDETAIL
The time to merge polygon mesh details. (See: rcMergePolyMeshDetails)
Definition Recast.h:154
@ RC_TIMER_BUILD_DISTANCEFIELD
The total time to build the distance field. (See: rcBuildDistanceField)
Definition Recast.h:134
@ RC_TIMER_BUILD_POLYMESH
The time to build the polygon mesh. (See: rcBuildPolyMesh)
Definition Recast.h:122
@ RC_TIMER_BUILD_COMPACTHEIGHTFIELD
The time to build the compact heightfield. (See: rcBuildCompactHeightfield)
Definition Recast.h:104
@ RC_MAX_TIMERS
The maximum number of timers. (Used for iterating timers.)
Definition Recast.h:156
@ RC_TIMER_MARK_BOX_AREA
The time to mark a box area. (See: rcMarkBoxArea)
Definition Recast.h:128
@ RC_TIMER_RASTERIZE_TRIANGLES
The time to rasterize the triangles. (See: rcRasterizeTriangle)
Definition Recast.h:102
@ RC_TIMER_FILTER_BORDER
The time to filter ledge spans. (See: rcFilterLedgeSpans)
Definition Recast.h:114
@ RC_TIMER_BUILD_REGIONS_FLOOD
The time to flood regions while applying the watershed algorithm. (See: rcBuildRegions)
Definition Recast.h:146
@ RC_TIMER_BUILD_CONTOURS
The total time to build the contours. (See: rcBuildContours)
Definition Recast.h:106
@ RC_TIMER_BUILD_CONTOURS_TRACE
The time to trace the boundaries of the contours. (See: rcBuildContours)
Definition Recast.h:108
@ RC_TIMER_BUILD_REGIONS_WATERSHED
The total time to apply the watershed algorithm. (See: rcBuildRegions)
Definition Recast.h:142
@ RC_TIMER_TEMP
A user defined build time.
Definition Recast.h:100
@ RC_TIMER_BUILD_REGIONS_EXPAND
The time to expand regions while applying the watershed algorithm. (See: rcBuildRegions)
Definition Recast.h:144
@ RC_TIMER_BUILD_DISTANCEFIELD_BLUR
The time to blur the distance field. (See: rcBuildDistanceField)
Definition Recast.h:138
@ RC_TIMER_BUILD_DISTANCEFIELD_DIST
The time to build the distances of the distance field. (See: rcBuildDistanceField)
Definition Recast.h:136
@ RC_TIMER_BUILD_LAYERS
The time to build heightfield layers. (See: rcBuildHeightfieldLayers)
Definition Recast.h:150
@ RC_TIMER_BUILD_CONTOURS_SIMPLIFY
The time to simplify the contours. (See: rcBuildContours)
Definition Recast.h:110
@ RC_TIMER_MARK_CYLINDER_AREA
The time to mark a cylinder area. (See: rcMarkCylinderArea)
Definition Recast.h:130
@ RC_TIMER_MARK_CONVEXPOLY_AREA
The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)
Definition Recast.h:132
@ RC_TIMER_ERODE_AREA
The time to erode the walkable area. (See: rcErodeWalkableArea)
Definition Recast.h:126
@ RC_TIMER_TOTAL
The user defined total time of the build.
Definition Recast.h:98
@ RC_TIMER_FILTER_WALKABLE
The time to filter low height spans. (See: rcFilterWalkableLowHeightSpans)
Definition Recast.h:116
@ RC_TIMER_BUILD_REGIONS
The total time to build the regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition Recast.h:140
@ RC_TIMER_FILTER_LOW_OBSTACLES
The time to filter low obstacles. (See: rcFilterLowHangingWalkableObstacles)
Definition Recast.h:120
@ RC_TIMER_MEDIAN_AREA
The time to apply the median filter. (See: rcMedianFilterWalkableArea)
Definition Recast.h:118
float rcFloor(float x)
Definition Recast.h:53
NAVMESH_API void rcReplaceCylinderArea(rcContext *ctx, const rcReal *pos, const rcReal r, const rcReal h, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:1156
NAVMESH_API bool rcBuildPolyMesh(rcContext *ctx, rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
Definition RecastMesh.cpp:904
NAVMESH_API void rcMarkWalkableTrianglesCos(rcContext *ctx, const rcReal walkableSlopeCos, const rcReal *verts, int nv, const int *tris, int nt, unsigned char *areas)
Definition Recast.cpp:368
NAVMESH_API void rcFreePolyMesh(rcPolyMesh *pmesh)
Definition Recast.cpp:192
NAVMESH_API bool rcBuildHeightfieldLayersMonotone(rcContext *ctx, rcCompactHeightfield &chf, const rcBorderSize borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
Definition RecastLayers.cpp:895
rcReal rcVdot(const rcReal *v1, const rcReal *v2)
Definition Recast.h:809
NAVMESH_API void rcCacheSpans(rcContext *ctx, rcHeightfield &hf, rcSpanCache *cachedSpans)
Definition RecastRasterization.cpp:234
void rcSwap(T &a, T &b)
Definition Recast.h:748
float rcCos(float x)
Definition Recast.h:43
T rcClamp(T v, T mn, T mx)
Definition Recast.h:781
NAVMESH_API void rcFreeCompactHeightfield(rcCompactHeightfield *chf)
Definition Recast.cpp:114
float rcSin(float x)
Definition Recast.h:33
rcNeighborSlopeFilterMode
Definition Recast.h:711
@ RC_SLOPE_FILTER_NONE
Definition Recast.h:713
@ RC_SLOPE_FILTER_RECAST
Definition Recast.h:712
@ RC_SLOPE_FILTER_USE_HEIGHT_FROM_WALKABLE_SLOPE
Definition Recast.h:714
void rcVcopy(rcReal *dest, const rcReal *v)
Definition Recast.h:871
NAVMESH_API rcHeightfield * rcAllocHeightfield()
Definition Recast.cpp:79
NAVMESH_API void rcResetHeightfield(rcHeightfield &hf)
Definition Recast.cpp:301
NAVMESH_API rcCompactHeightfield * rcAllocCompactHeightfield()
Definition Recast.cpp:107
NAVMESH_API bool rcCreateHeightfield(rcContext *ctx, rcHeightfield &hf, int width, int height, const rcReal *bmin, const rcReal *bmax, rcReal cs, rcReal ch, bool bAllocateTempSpanColumns=false)
Definition Recast.cpp:243
void rcSetCon(rcCompactSpan &s, int dir, int i)
Definition Recast.h:1353
NAVMESH_API void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet *lset)
Definition Recast.cpp:132
NAVMESH_API 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)
rcReal rcVdistSqr(const rcReal *v1, const rcReal *v2)
Definition Recast.h:894
NAVMESH_API bool rcErodeWalkableAndLowAreas(rcContext *ctx, int radius, unsigned int height, unsigned char areaId, unsigned char filterFlags, rcCompactHeightfield &chf)
Definition RecastArea.cpp:374
void rcVmin(rcReal *mn, const rcReal *v)
Definition Recast.h:851
NAVMESH_API bool rcMergePolyMeshes(rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
Definition RecastMesh.cpp:1222
NAVMESH_API bool rcBuildContours(rcContext *ctx, rcCompactHeightfield &chf, const rcReal maxError, const int maxEdgeLen, rcContourSet &cset, const int flags=RC_CONTOUR_TESS_WALL_EDGES)
Definition RecastContour.cpp:606
NAVMESH_API rcPolyMeshDetail * rcAllocPolyMeshDetail()
Definition Recast.cpp:203
NAVMESH_API void rcFilterWalkableLowHeightSpansSequences(rcContext *ctx, int walkableHeight, rcHeightfield &solid)
Definition RecastFilter.cpp:260
NAVMESH_API void rcFilterWalkableLowHeightSpans(rcContext *ctx, int walkableHeight, rcHeightfield &solid)
Definition RecastFilter.cpp:231
unsigned int rcSpanUInt
Definition Recast.h:352
rcBuildContoursFlags
Definition Recast.h:690
@ RC_CONTOUR_TESS_WALL_EDGES
Tessellate solid (impassable) edges during contour simplification.
Definition Recast.h:691
@ RC_CONTOUR_TESS_AREA_EDGES
Tessellate edges between areas during contour simplification.
Definition Recast.h:692
void rcVadd(rcReal *dest, const rcReal *v1, const rcReal *v2)
Definition Recast.h:830
NAVMESH_API void rcClearUnwalkableTriangles(rcContext *ctx, const rcReal walkableSlopeAngle, const rcReal *verts, int nv, const int *tris, int nt, unsigned char *areas)
Definition Recast.cpp:392
NAVMESH_API void rcFreePolyMeshDetail(rcPolyMeshDetail *dmesh)
Definition Recast.cpp:210
NAVMESH_API int rcGetHeightFieldSpanCount(rcContext *ctx, rcHeightfield &hf)
Definition Recast.cpp:414
float rcAbs(float x)
Definition Recast.h:73
NAVMESH_API rcPolyMesh * rcAllocPolyMesh()
Definition Recast.cpp:185
NAVMESH_API rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet()
Definition Recast.cpp:125
NAVMESH_API void rcFreeContourSet(rcContourSet *cset)
Definition Recast.cpp:153
NAVMESH_API bool rcCopyPolyMesh(rcContext *ctx, const rcPolyMesh &src, rcPolyMesh &dst)
Definition RecastMesh.cpp:1366
rcLogCategory
Definition Recast.h:87
@ RC_LOG_WARNING
A warning log entry.
Definition Recast.h:89
@ RC_LOG_PROGRESS
A progress log entry.
Definition Recast.h:88
@ RC_LOG_ERROR
An error log entry.
Definition Recast.h:90
NAVMESH_API void rcRasterizeTriangles(rcContext *ctx, const rcReal *verts, const int nv, const int *tris, const unsigned char *areas, const int nt, rcHeightfield &solid, const int flagMergeThr=1, const int rasterizationFlags=0, const int *rasterizationMasks=nullptr, const rcReal *vertsbmin=nullptr, const rcReal *vertsbmax=nullptr)
Definition RecastRasterization.cpp:1199
int rcGetCon(const rcCompactSpan &s, int dir)
Definition Recast.h:1365
NAVMESH_API bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, const int borderSize, const int minRegionArea, const int mergeRegionArea)
NAVMESH_API void rcRasterizeTriangle(rcContext *ctx, const rcReal *v0, const rcReal *v1, const rcReal *v2, const unsigned char area, rcHeightfield &solid, const int flagMergeThr=1, const int rasterizationFlags=0, const int *rasterizationMasks=nullptr)
Definition RecastRasterization.cpp:1177
NAVMESH_API bool rcBuildDistanceField(rcContext *ctx, rcCompactHeightfield &chf)
Definition RecastRegion.cpp:956
NAVMESH_API void rcCalcTriNormals(const rcReal *verts, const int nv, const int *tris, const int nt, rcReal *norms)
Definition Recast.cpp:334
rcRasterizationFlags
Definition Recast.h:704
@ RC_RASTERIZE_AS_FILLED_CONVEX
Will rasterize all the triangles of a list into a single span for each (x,z) and then add all those s...
Definition Recast.h:706
@ RC_PROJECT_TO_BOTTOM
Will create spans from the triangle surface to the bottom of the heightfield.
Definition Recast.h:705
NAVMESH_API void rcAddSpans(rcContext *ctx, rcHeightfield &hf, const int flagMergeThr, const rcSpanCache *cachedSpans, const int nspans)
Definition RecastRasterization.cpp:203
NAVMESH_API void rcCalcGridSize(const rcReal *bmin, const rcReal *bmax, rcReal cs, int *w, int *h)
Definition Recast.cpp:232
void rcVmax(rcReal *mx, const rcReal *v)
Definition Recast.h:861
T rcSqr(T a)
Definition Recast.h:774
NAVMESH_API bool rcBuildRegionsMonotone(rcContext *ctx, rcCompactHeightfield &chf, const rcBorderSize borderSize, const int minRegionArea, const int mergeRegionArea)
Definition RecastRegion.cpp:1083
void rcVsub(rcReal *dest, const rcReal *v1, const rcReal *v2)
Definition Recast.h:841
void rcVmad(rcReal *dest, const rcReal *v1, const rcReal *v2, const rcReal s)
Definition Recast.h:819
NAVMESH_API void rcReplaceBoxArea(rcContext *ctx, const rcReal *bmin, const rcReal *bmax, unsigned char areaId, unsigned char filterAreaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:1030
NAVMESH_API void rcMarkWalkableTriangles(rcContext *ctx, const rcReal walkableSlopeAngle, const rcReal *verts, int nv, const int *tris, int nt, unsigned char *areas)
Definition Recast.cpp:356
NAVMESH_API bool rcMarkLowAreas(rcContext *ctx, unsigned int height, unsigned char areaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:713
NAVMESH_API bool rcBuildHeightfieldLayersChunky(rcContext *ctx, rcCompactHeightfield &chf, const rcBorderSize borderSize, const int walkableHeight, const int chunkSize, rcHeightfieldLayerSet &lset)
Definition RecastLayers.cpp:937
void rcVnormalize(rcReal *v)
Definition Recast.h:904
rcFilterLowAreaFlags
Definition Recast.h:697
@ RC_LOW_FILTER_SEED_SPANS
initial seeding on spans
Definition Recast.h:698
@ RC_LOW_FILTER_POST_PROCESS
additional filtering at the end
Definition Recast.h:699
NAVMESH_API bool rcBuildPolyMeshDetail(rcContext *ctx, const rcPolyMesh &mesh, const rcCompactHeightfield &chf, const rcReal sampleDist, const rcReal sampleMaxError, rcPolyMeshDetail &dmesh)
Definition RecastMeshDetail.cpp:955
T rcMin(T a, T b)
Definition Recast.h:754
NAVMESH_API void rcCalcBounds(const rcReal *verts, int nv, rcReal *bmin, rcReal *bmax)
Definition Recast.cpp:219
NAVMESH_API bool rcMergePolyMeshDetails(rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
Definition RecastMeshDetail.cpp:1174
NAVMESH_API int rcCountSpans(rcContext *ctx, rcHeightfield &hf)
Definition RecastRasterization.cpp:213
rcReal rcVdist(const rcReal *v1, const rcReal *v2)
Definition Recast.h:882
int rcGetDirOffsetY(int dir)
Definition Recast.h:1385
NAVMESH_API bool rcErodeWalkableArea(rcContext *ctx, int radius, rcCompactHeightfield &chf)
Definition RecastArea.cpp:36
rcReal rcSqrt(rcReal x)
Definition Recast.cpp:35
NAVMESH_API void rcFilterLowHangingWalkableObstacles(rcContext *ctx, const int walkableClimb, rcHeightfield &solid)
Definition RecastFilter.cpp:37
NAVMESH_API bool rcMedianFilterWalkableArea(rcContext *ctx, rcCompactHeightfield &chf)
Definition RecastArea.cpp:639
NAVMESH_API rcContourSet * rcAllocContourSet()
Definition Recast.cpp:146
T rcMax(T a, T b)
Definition Recast.h:762
void rcVcross(rcReal *dest, const rcReal *v1, const rcReal *v2)
Definition Recast.h:798
rcRegionPartitioning
Definition Recast.h:242
@ RC_REGION_CHUNKY
monotone partitioning on small chunks
Definition Recast.h:245
@ RC_REGION_WATERSHED
watershed partitioning
Definition Recast.h:244
@ RC_REGION_MONOTONE
monotone partitioning
Definition Recast.h:243
NAVMESH_API void rcFilterLedgeSpans(rcContext *ctx, const int walkableHeight, const int walkableClimb, const rcNeighborSlopeFilterMode neighborSlopeFilterMode, const rcReal maxStepFromWalkableSlope, const rcReal ch, const int yStart, const int maxYProcess, rcHeightfield &solid)
Definition RecastFilter.cpp:206
NAVMESH_API bool rcBuildHeightfieldLayers(rcContext *ctx, rcCompactHeightfield &chf, const rcBorderSize borderSize, const int walkableHeight, rcHeightfieldLayerSet &lset)
Definition RecastLayers.cpp:1109
NAVMESH_API void rcMarkConvexPolyArea(rcContext *ctx, const rcReal *verts, const int nverts, const rcReal hmin, const rcReal hmax, unsigned char areaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:809
NAVMESH_API int rcOffsetPoly(const rcReal *verts, const int nverts, const rcReal offset, rcReal *outVerts, const int maxOutVerts)
Definition RecastArea.cpp:876
NAVMESH_API void rcMarkCylinderArea(rcContext *ctx, const rcReal *pos, const rcReal r, const rcReal h, unsigned char areaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:959
NAVMESH_API void rcMarkBoxArea(rcContext *ctx, const rcReal *bmin, const rcReal *bmax, unsigned char areaId, rcCompactHeightfield &chf)
Definition RecastArea.cpp:741
NAVMESH_API void rcFreeHeightField(rcHeightfield *hf)
Definition Recast.cpp:86
NAVMESH_API bool rcBuildRegionsChunky(rcContext *ctx, rcCompactHeightfield &chf, const rcBorderSize borderSize, const int minRegionArea, const int mergeRegionArea, const int chunkSize)
Definition RecastRegion.cpp:1221
float shift(float inValue, float expShift)
Definition RenderCore.cpp:859
char * dst
Definition lz4.h:735
char * dest
Definition lz4.h:709
Definition Recast.h:165
virtual ~rcContext()
Definition Recast.h:171
void enableLog(bool state)
Definition Recast.h:175
int getAccumulatedTime(const rcTimerLabel label) const
Definition Recast.h:203
void resetTimers()
Clears all peformance timers. (Resets all to unused.)
Definition Recast.h:190
void startTimer(const rcTimerLabel label)
Definition Recast.h:194
void stopTimer(const rcTimerLabel label)
Definition Recast.h:198
virtual void doResetTimers()
Clears all timers. (Resets all to unused.)
Definition Recast.h:217
void resetLog()
Clears all log entries.
Definition Recast.h:178
virtual void doStopTimer(const rcTimerLabel)
Definition Recast.h:225
bool m_timerEnabled
True if the performance timers are enabled.
Definition Recast.h:236
virtual void doStartTimer(const rcTimerLabel)
Definition Recast.h:221
void enableTimer(bool state)
Definition Recast.h:187
virtual int doGetAccumulatedTime(const rcTimerLabel) const
Definition Recast.h:230
virtual void doLog(const rcLogCategory, const char *, const int)
Definition Recast.h:214
NAVMESH_API void log(const rcLogCategory category, const char *format,...)
Definition Recast.cpp:61
rcContext(bool state=true)
Definition Recast.h:170
virtual void doResetLog()
Clears all log entries.
Definition Recast.h:208
bool m_logEnabled
True if logging is enabled.
Definition Recast.h:233
Definition ClothingSystemRuntimeModuleNv.h:10
float v
Definition radaudio_mdct.cpp:62
Specifies the size of borders around the heightfield.
Definition Recast.h:251
int low
Size of the border in the negative direction of the axis [Limit: >= 0] [Units: vx].
Definition Recast.h:252
int high
Size of the border in the positive direction of the axis [Limit: >= 0] [Units: vx].
Definition Recast.h:253
Provides information on the content of a cell column in a compact heightfield.
Definition Recast.h:430
unsigned int count
Number of spans in the column.
Definition Recast.h:432
unsigned int index
Index to the first span in the column.
Definition Recast.h:431
Definition Recast.h:447
int walkableHeight
The walkable height used during the build of the field. (See: rcConfig::walkableHeight)
Definition Recast.h:451
rcReal cs
The size of each cell. (On the xz-plane.)
Definition Recast.h:458
rcReal ch
The height of each cell. (The minimum increment along the y-axis.)
Definition Recast.h:459
rcCompactSpan * spans
Array of spans. [Size: spanCount].
Definition Recast.h:461
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition Recast.h:449
unsigned short maxDistance
The maximum distance value of any span within the field.
Definition Recast.h:454
unsigned short maxRegions
The maximum region id of any span within the field.
Definition Recast.h:455
int spanCount
The number of spans in the heightfield.
Definition Recast.h:450
rcBorderSize borderSize
The AABB border size used during the build of the field. (See: rcConfig::borderSize) //@UE.
Definition Recast.h:453
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition Recast.h:448
rcReal bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition Recast.h:456
rcCompactCell * cells
Array of cells. [Size: width*height].
Definition Recast.h:460
unsigned char * areas
Array containing area id data. [Size: spanCount].
Definition Recast.h:463
rcReal bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition Recast.h:457
int walkableClimb
The walkable climb used during the build of the field. (See: rcConfig::walkableClimb)
Definition Recast.h:452
unsigned short * dist
Array containing border distance data. [Size: spanCount].
Definition Recast.h:462
Represents a span of unobstructed space within a compact heightfield.
Definition Recast.h:437
rcSpanUInt y
The lower extent of the span. (Measured from the heightfield's base.)
Definition Recast.h:438
unsigned char h
The height of the span. (Measured from y.)
Definition Recast.h:441
unsigned int con
Packed neighbor connection data.
Definition Recast.h:439
unsigned short reg
The id of the region the span belongs to. (Or zero if not in a region.)
Definition Recast.h:440
Definition Recast.h:260
rcReal maxStepFromWalkableSlope
Maximum step height in relation to cs and walkableSlopeAngle [Limit: >=0] [Units: wu].
Definition Recast.h:300
int minRegionArea
The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx].
Definition Recast.h:314
int maxVertsPerPoly
Definition Recast.h:328
rcReal detailSampleMaxError
Definition Recast.h:336
int height
The height of the field along the z-axis. [Limit: >= 0] [Units: vx].
Definition Recast.h:265
rcReal ch
The y-axis cell size to use for fields. [Limit: > 0] [Units: wu].
Definition Recast.h:277
rcReal maxSimplificationError
Definition Recast.h:307
int tileSize
The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx].
Definition Recast.h:268
rcReal detailSampleDist
Definition Recast.h:332
rcReal bmax[3]
The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition Recast.h:283
int walkableRadius
Definition Recast.h:297
rcBorderSize borderSize
The size of the non-navigable border around the heightfield.
Definition Recast.h:271
int width
The width of the field along the x-axis. [Limit: >= 0] [Units: vx].
Definition Recast.h:262
int mergeRegionArea
Definition Recast.h:318
int walkableHeight
Definition Recast.h:290
int maxEdgeLen
The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx].
Definition Recast.h:303
int walkableClimb
Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx].
Definition Recast.h:293
rcReal walkableSlopeAngle
The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees].
Definition Recast.h:286
int regionPartitioning
Region partitioning method: creating poly mesh.
Definition Recast.h:324
int regionChunkSize
Size of region chunk [Units: vx].
Definition Recast.h:321
rcReal simplificationElevationRatio
Definition Recast.h:311
rcReal bmin[3]
The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu].
Definition Recast.h:280
rcReal cs
The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu].
Definition Recast.h:274
Definition Recast.h:510
int height
The height of the set. (Along the z-axis in cell units.)
Definition Recast.h:518
rcReal ch
The height of each cell. (The minimum increment along the y-axis.)
Definition Recast.h:516
rcReal cs
The size of each cell. (On the xz-plane.)
Definition Recast.h:515
rcReal bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition Recast.h:513
int nconts
The number of contours in the set.
Definition Recast.h:512
rcReal bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition Recast.h:514
rcContour * conts
An array of the contours in the set. [Size: nconts].
Definition Recast.h:511
rcBorderSize borderSize
The AABB border size used to generate the source data from which the contours were derived....
Definition Recast.h:519
int width
The width of the set. (Along the x-axis in cell units.)
Definition Recast.h:517
Represents a simple, non-overlapping contour in field space.
Definition Recast.h:498
int nrverts
The number of vertices in the raw contour.
Definition Recast.h:502
unsigned char area
The area id of the contour.
Definition Recast.h:504
int * rverts
Raw contour vertex and connection data. [Size: 4 * nrverts].
Definition Recast.h:501
unsigned short reg
The region id of the contour.
Definition Recast.h:503
int * verts
Simplified contour vertex and connection data. [Size: 4 * nverts].
Definition Recast.h:499
int nverts
The number of vertices in the simplified contour.
Definition Recast.h:500
Definition Recast.h:396
unsigned char Hits[2]
Definition Recast.h:397
Definition Recast.h:491
rcHeightfieldLayer * layers
The layers in the set. [Size: nlayers].
Definition Recast.h:492
int nlayers
The number of layers in the set.
Definition Recast.h:493
Definition Recast.h:469
unsigned short * heights
The heightfield. [Size: (width - borderSize*2) * (h - borderSize*2)].
Definition Recast.h:482
rcReal cs
The size of each cell. (On the xz-plane.)
Definition Recast.h:472
unsigned char * cons
Packed neighbor connection information. [Size: Same as heights].
Definition Recast.h:484
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition Recast.h:475
rcReal ch
The height of each cell. (The minimum increment along the y-axis.)
Definition Recast.h:473
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition Recast.h:474
int hmin
The minimum height bounds of usable data. (Along the y-axis.) //.
Definition Recast.h:480
unsigned char * areas
Area ids. [Size: Same as heights].
Definition Recast.h:483
int hmax
The maximum height bounds of usable data. (Along the y-axis.)
Definition Recast.h:481
int maxx
The maximum x-bounds of usable data.
Definition Recast.h:477
rcReal bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition Recast.h:471
int maxy
The maximum y-bounds of usable data. (Along the z-axis.)
Definition Recast.h:479
int minx
The minimum x-bounds of usable data.
Definition Recast.h:476
int miny
The minimum y-bounds of usable data. (Along the z-axis.)
Definition Recast.h:478
rcReal bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition Recast.h:470
Definition Recast.h:408
rcSpan * freelist
The next free span.
Definition Recast.h:417
rcReal bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition Recast.h:411
rcSpan ** spans
Heightfield of spans (width*height).
Definition Recast.h:415
rcReal ch
The height of each cell. (The minimum increment along the y-axis.)
Definition Recast.h:414
rcTempSpan * tempspans
Heightfield of temp spans (width*height).
Definition Recast.h:422
rcReal cs
The size of each cell. (On the xz-plane.)
Definition Recast.h:413
int height
The height of the heightfield. (Along the z-axis in cell units.)
Definition Recast.h:410
rcSpanData * tempSpanColumns
Heightfield of 1 span per cell for vertical column rasterization //UE.
Definition Recast.h:423
rcReal bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition Recast.h:412
rcSpanPool * pools
Linked list of span pools.
Definition Recast.h:416
int width
The width of the heightfield. (Along the x-axis in cell units.)
Definition Recast.h:409
rcEdgeHit * EdgeHits
h + 1 bit flags that indicate what edges cross the z cell boundaries
Definition Recast.h:420
rcRowExt * RowExt
h structs that give the current x range for this z row
Definition Recast.h:421
Definition Recast.h:560
unsigned char * tris
The mesh triangles. [Size: 4*ntris].
Definition Recast.h:563
int nverts
The number of vertices in verts.
Definition Recast.h:565
int ntris
The number of triangles in tris.
Definition Recast.h:566
rcReal * verts
The mesh vertices. [Size: 3*nverts].
Definition Recast.h:562
unsigned int * meshes
The sub-mesh data. [Size: 4*nmeshes].
Definition Recast.h:561
int nmeshes
The number of sub-meshes defined by meshes.
Definition Recast.h:564
Definition Recast.h:539
unsigned short * verts
The mesh vertices. [Form: (x, y, z) * nverts].
Definition Recast.h:540
rcReal bmax[3]
The maximum bounds in world space. [(x, y, z)].
Definition Recast.h:550
unsigned char * areas
The area id assigned to each polygon. [Length: maxpolys].
Definition Recast.h:544
unsigned short * regs
The region id assigned to each polygon. [Length: maxpolys].
Definition Recast.h:542
rcReal bmin[3]
The minimum bounds in world space. [(x, y, z)].
Definition Recast.h:549
int nvp
The maximum number of vertices per polygon.
Definition Recast.h:548
unsigned short * polys
Polygon and neighbor data. [Length: maxpolys * 2 * nvp].
Definition Recast.h:541
unsigned short * flags
The user defined flags for each polygon. [Length: maxpolys].
Definition Recast.h:543
int npolys
The number of polygons.
Definition Recast.h:546
rcReal cs
The size of each cell. (On the xz-plane.)
Definition Recast.h:551
int nverts
The number of vertices.
Definition Recast.h:545
rcBorderSize borderSize
The AABB border size used to generate the source data from which the mesh was derived....
Definition Recast.h:553
rcReal ch
The height of each cell. (The minimum increment along the y-axis.)
Definition Recast.h:552
int maxpolys
The number of allocated polygons.
Definition Recast.h:547
Definition Recast.h:391
int MinCol
Definition Recast.h:392
int MaxCol
Definition Recast.h:393
Definition Recast.h:364
unsigned short x
Definition Recast.h:365
unsigned short y
Definition Recast.h:366
rcSpanData data
Definition Recast.h:367
Definition Recast.h:357
rcSpanUInt smin
The lower limit of the span. [Limit: < smax].
Definition Recast.h:358
rcSpanUInt smax
The upper limit of the span. [Limit: <= RC_SPAN_MAX_HEIGHT].
Definition Recast.h:359
unsigned int area
The area id assigned to the span.
Definition Recast.h:360
Definition Recast.h:381
rcSpan items[RC_SPANS_PER_POOL]
Array of spans in the pool.
Definition Recast.h:383
rcSpanPool * next
The next span pool.
Definition Recast.h:382
Definition Recast.h:373
rcSpanData data
Span data.
Definition Recast.h:374
rcSpan * next
The next span higher up in column.
Definition Recast.h:375
Definition Recast.h:400
int sminmax[2]
The lower and upper limit of the span. [Limit: < #smax].
Definition Recast.h:401