![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "CoreMinimal.h"#include "Recast/Recast.h"#include "Recast/RecastAlloc.h"#include "Recast/RecastAssert.h"Macros | |
| #define | _USE_MATH_DEFINES |
| #define _USE_MATH_DEFINES |
| void FilterLowHeightSpans | ( | int | w, |
| int | h, | ||
| int | lowSpanHeight, | ||
| unsigned char | areaId, | ||
| const rcCompactHeightfield & | chf | ||
| ) |
| bool rcErodeWalkableAndLowAreas | ( | rcContext * | ctx, |
| int | radius, | ||
| unsigned int | height, | ||
| unsigned char | areaId, | ||
| unsigned char | filterFlags, | ||
| rcCompactHeightfield & | chf | ||
| ) |
Basically, any spans that are closer to a boundary or obstruction than the specified radius are marked as unwalkable.
This method is usually called immediately after the heightfield has been built.
| bool rcErodeWalkableArea | ( | rcContext * | ctx, |
| int | radius, | ||
| rcCompactHeightfield & | chf | ||
| ) |
Basically, any spans that are closer to a boundary or obstruction than the specified radius are marked as unwalkable.
This method is usually called immediately after the heightfield has been built.
| void rcMarkBoxArea | ( | rcContext * | ctx, |
| const rcReal * | bmin, | ||
| const rcReal * | bmax, | ||
| unsigned char | areaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
| void rcMarkConvexPolyArea | ( | rcContext * | ctx, |
| const rcReal * | verts, | ||
| const int | nverts, | ||
| const rcReal | hmin, | ||
| const rcReal | hmax, | ||
| unsigned char | areaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
The y-values of the polygon vertices are ignored. So the polygon is effectively projected onto the xz-plane at hmin, then extruded to hmax.
| void rcMarkCylinderArea | ( | rcContext * | ctx, |
| const rcReal * | pos, | ||
| const rcReal | r, | ||
| const rcReal | h, | ||
| unsigned char | areaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
| bool rcMarkLowAreas | ( | rcContext * | ctx, |
| unsigned int | height, | ||
| unsigned char | areaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
Marks all spans that have insufficient free space above
| [in,out] | ctx | The build context to use during the operation. |
| [in,out] | chf | A populated compact heightfield. |
| [in] | height | Height threshold [Units: vx] |
| [in] | areaId | The area id to apply [Limit: <= @RC_WALKABLE_AREA] |
| bool rcMedianFilterWalkableArea | ( | rcContext * | ctx, |
| rcCompactHeightfield & | chf | ||
| ) |
This filter is usually applied after applying area id's using functions such as rcMarkBoxArea, rcMarkConvexPolyArea, and rcMarkCylinderArea.
| int rcOffsetPoly | ( | const rcReal * | verts, |
| const int | nverts, | ||
| const rcReal | offset, | ||
| rcReal * | outVerts, | ||
| const int | maxOutVerts | ||
| ) |
Helper function to offset voncex polygons for rcMarkConvexPolyArea.
| [in] | verts | The vertices of the polygon [Form: (x, y, z) * nverts] |
| [in] | nverts | The number of vertices in the polygon. |
| [out] | outVerts | The offset vertices (should hold up to 2 * nverts) [Form: (x, y, z) * return value] |
| [in] | maxOutVerts | The max number of vertices that can be stored to outVerts. |
outVerts. | void rcReplaceBoxArea | ( | rcContext * | ctx, |
| const rcReal * | bmin, | ||
| const rcReal * | bmax, | ||
| unsigned char | areaId, | ||
| unsigned char | filterAreaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
| void rcReplaceConvexPolyArea | ( | rcContext * | ctx, |
| const rcReal * | verts, | ||
| const int | nverts, | ||
| const rcReal | hmin, | ||
| const rcReal | hmax, | ||
| unsigned char | areaId, | ||
| unsigned char | filterAreaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
The y-values of the polygon vertices are ignored. So the polygon is effectively projected onto the xz-plane at hmin, then extruded to hmax.
| void rcReplaceCylinderArea | ( | rcContext * | ctx, |
| const rcReal * | pos, | ||
| const rcReal | r, | ||
| const rcReal | h, | ||
| unsigned char | areaId, | ||
| unsigned char | filterAreaId, | ||
| rcCompactHeightfield & | chf | ||
| ) |
The value of spacial parameters are in world units.
| void SeedWalkableAreasErode | ( | int | w, |
| int | h, | ||
| int | lowSpanHeight, | ||
| int | lowSpanSeed, | ||
| const rcCompactHeightfield & | chf, | ||
| unsigned char * | dist, | ||
| unsigned char * | seed | ||
| ) |