rcAddSpan

Adds a span to the specified 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/RecastRasterization.cpp

Syntax

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
)

Remarks

Adds a span to the specified heightfield.

The span addition can be set to favor flags. If the span is merged to another span and the new smax_ is within flagMergeThr_ units from the existing span, the span flags are merged.

Parameters

Parameter

Description

ctx

The build context to use during the operation.

hf

An initialized heightfield.

x

The width index where the span is to be added. [Limits: 0 <= value < rcHeightfield::width]

y

The height index where the span is to be added. [Limits: 0 <= value < rcHeightfield::height]

smin

The minimum height of the span. [Limit: < smax] [Units: vx]

smax

The maximum height of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT] [Units: vx]

area

The area id of the span. [Limit: <= #RC_WALKABLE_AREA)

flagMergeThr

The merge theshold. [Limit: >= 0] [Units: vx]

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