rcBuildContours

Builds a contour set from the region outlines in the provided compact heightfield.

Windows
MacOS
Linux

References

Module

Navmesh

Header

/Engine/Source/Runtime/Navmesh/Public/Recast/Recast.h

Include

#include "Recast/Recast.h"

Source

/Engine/Source/Runtime/Navmesh/Private/Recast/RecastContour.cpp

Syntax

bool rcBuildContours
(
    rcContext * ctx,
    rcCompactHeightfield & chf,
    const float maxError,
    const int maxEdgeLen,
    rcContourSet & cset,
    const int flags
)

Remarks

Builds a contour set from the region outlines in the provided compact heightfield.

The raw contours will match the region outlines exactly. The maxError_ and maxEdgeLen_ parameters control how closely the simplified contours will match the raw contours.

Simplified contours are generated such that the vertices for portals between areas match up. (They are considered mandatory vertices.)

Setting `maxEdgeLength_ to zero will disabled the edge length feature.

See the rcConfig documentation for more information on the configuration parameters.

Returns

True if the operation completed successfully.

Parameters

Parameter

Description

ctx

The build context to use during the operation.

chf

A fully built compact heightfield.

maxError

The maximum distance a simplfied contour's border edges should deviate the original raw contour. [Limit: >=0] [Units: wu]

maxEdgeLen

The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]

cset

The resulting contour set. (Must be pre-allocated.)

buildFlags

The build flags. (See: rcBuildContoursFlags)

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss