![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Macros | |
| #define | _USE_MATH_DEFINES |
| #define _USE_MATH_DEFINES |
| DEFINE_LOG_CATEGORY | ( | LogRecast | ) |
| rcCompactHeightfield * rcAllocCompactHeightfield | ( | ) |
Allocates a compact heightfield object using the Recast allocator.
| rcContourSet * rcAllocContourSet | ( | ) |
Allocates a contour set object using the Recast allocator.
| rcHeightfield * rcAllocHeightfield | ( | ) |
Allocates a heightfield object using the Recast allocator.
| rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet | ( | ) |
Allocates a heightfield layer set using the Recast allocator.
| rcPolyMesh * rcAllocPolyMesh | ( | ) |
Allocates a polygon mesh object using the Recast allocator.
| rcPolyMeshDetail * rcAllocPolyMeshDetail | ( | ) |
Allocates a detail mesh object using the Recast allocator.
| bool rcBuildCompactHeightfield | ( | rcContext * | ctx, |
| const int | walkableHeight, | ||
| const int | walkableClimb, | ||
| rcHeightfield & | hf, | ||
| rcCompactHeightfield & | chf | ||
| ) |
This is just the beginning of the process of fully building a compact heightfield. Various filters may be applied applied, then the distance field and regions built. E.g: rcBuildDistanceField and rcBuildRegions
See the rcConfig documentation for more information on the configuration parameters.
Calculates the bounding box of an array of vertices.
| [in] | verts | An array of vertices. [(x, y, z) * nv] |
| [in] | nv | The number of vertices in the verts array. |
| [out] | bmin | The minimum bounds of the AABB. [(x, y, z)] [Units: wu] |
| [out] | bmax | The maximum bounds of the AABB. [(x, y, z)] [Units: wu] |
Calculates the grid size based on the bounding box and grid cell size.
| [in] | bmin | The minimum bounds of the AABB. [(x, y, z)] [Units: wu] |
| [in] | bmax | The maximum bounds of the AABB. [(x, y, z)] [Units: wu] |
| [in] | cs | The xz-plane cell size. [Limit: > 0] [Units: wu] |
| [out] | w | The width along the x-axis. [Limit: >= 0] [Units: vx] |
| [out] | h | The height along the z-axis. [Limit: >= 0] [Units: vx] |
| void rcCalcTriNormals | ( | const rcReal * | verts, |
| const int | nv, | ||
| const int * | tris, | ||
| const int | nt, | ||
| rcReal * | norms | ||
| ) |
Calculates the normals of each triangles in an array
| [in] | verts | An array of vertices. [(x, y, z) * nv] |
| [in] | nv | The number of vertices in the verts array. |
| [in] | tris | The triangle vertex indices. [(vertA, vertB, vertC) * nt] |
| [in] | nt | The number of triangles. |
| [out] | norms | The normal vector of each triangle. [(x, y, z) * nt] |
| void rcClearUnwalkableTriangles | ( | rcContext * | ctx, |
| const rcReal | walkableSlopeAngle, | ||
| const rcReal * | verts, | ||
| int | nv, | ||
| const int * | tris, | ||
| int | nt, | ||
| unsigned char * | areas | ||
| ) |
Only sets the aread id's for the unwalkable triangles. Does not alter the area id's for walkable triangles.
See the rcConfig documentation for more information on the configuration parameters.
| bool rcCreateHeightfield | ( | rcContext * | ctx, |
| rcHeightfield & | hf, | ||
| int | width, | ||
| int | height, | ||
| const rcReal * | bmin, | ||
| const rcReal * | bmax, | ||
| rcReal | cs, | ||
| rcReal | ch, | ||
| bool | bAllocateTempSpanColumns | ||
| ) |
See the rcConfig documentation for more information on the configuration parameters.
| void rcFreeCompactHeightfield | ( | rcCompactHeightfield * | chf | ) |
Frees the specified compact heightfield object using the Recast allocator.
| [in] | chf | A compact heightfield allocated using rcAllocCompactHeightfield |
| void rcFreeContourSet | ( | rcContourSet * | cset | ) |
Frees the specified contour set using the Recast allocator.
| [in] | cset | A contour set allocated using rcAllocContourSet |
| void rcFreeHeightField | ( | rcHeightfield * | hf | ) |
Frees the specified heightfield object using the Recast allocator.
| [in] | hf | A heightfield allocated using rcAllocHeightfield |
| void rcFreeHeightfieldLayerSet | ( | rcHeightfieldLayerSet * | lset | ) |
Frees the specified heightfield layer set using the Recast allocator.
| [in] | lset | A heightfield layer set allocated using rcAllocHeightfieldLayerSet |
| void rcFreePolyMesh | ( | rcPolyMesh * | pmesh | ) |
Frees the specified polygon mesh using the Recast allocator.
| [in] | pmesh | A polygon mesh allocated using rcAllocPolyMesh |
| void rcFreePolyMeshDetail | ( | rcPolyMeshDetail * | dmesh | ) |
Frees the specified detail mesh using the Recast allocator.
| [in] | dmesh | A detail mesh allocated using rcAllocPolyMeshDetail |
| int rcGetHeightFieldSpanCount | ( | rcContext * | ctx, |
| rcHeightfield & | hf | ||
| ) |
Returns the number of spans contained in the specified heightfield.
| [in,out] | ctx | The build context to use during the operation. |
| [in] | hf | An initialized heightfield. |
| void rcMarkWalkableTriangles | ( | rcContext * | ctx, |
| const rcReal | walkableSlopeAngle, | ||
| const rcReal * | verts, | ||
| int | nv, | ||
| const int * | tris, | ||
| int | nt, | ||
| unsigned char * | areas | ||
| ) |
Only sets the aread id's for the walkable triangles. Does not alter the area id's for unwalkable triangles.
See the rcConfig documentation for more information on the configuration parameters.
| void rcMarkWalkableTrianglesCos | ( | rcContext * | ctx, |
| const rcReal | walkableSlopeCos, | ||
| const rcReal * | verts, | ||
| int | nv, | ||
| const int * | tris, | ||
| int | nt, | ||
| unsigned char * | areas | ||
| ) |
Sets the area id of all triangles with a slope below the specified value to RC_WALKABLE_AREA.
| [in,out] | ctx | The build context to use during the operation. |
| [in] | walkableSlopeCos | The cosine of maximum slope that is considered walkable. [Limits: 0 <= value < 1] |
| [in] | verts | The vertices. [(x, y, z) * nv] |
| [in] | nv | The number of vertices. |
| [in] | tris | The triangle vertex indices. [(vertA, vertB, vertC) * nt] |
| [in] | nt | The number of triangles. |
| [out] | areas | The triangle area ids. [Length: >= nt] |
| void rcResetHeightfield | ( | rcHeightfield & | hf | ) |
Resets all spans of heightfield.
| [in,out] | hf | The heightfield to reset. |
| [in] | bmin | The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu] |
| [in] | bmax | The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu] |
| [in,out] | hf | The heightfield toreset. |
Returns the square root of the value.
| [in] | x | The value. |