Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · function

Native::

FalloffWeight

The brush strength factor at a normalised distance, in floating point.

Declaration

inline double FalloffWeight(EFalloff Falloff, double T, double FalloffStart = 0.0);
Header
#include "Native/TerrainEdit.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Pure, any thread.

Description

The same curve as the sculpt kernel, which evaluates it in Q16 fixed point (within about 1/65536 of this; test Tier1.SculptKernel.FalloffWeightMatchesKernel): t is remapped to max(0, (t - S)/(1 - S)) before the polynomial, so the inner S of the radius is at full strength. For drawing and previews; a stroke never reads it.

Parameters

NameTypeDefaultMeaning
FalloffEFalloff—

The curve.

Tdouble—

Distance from the brush centre over the radius; above 1 is outside the brush.

FalloffStartdouble0.0

S, the inner radius of full strength over the radius; clamped to [0, 65535/65536].

Returns

The factor, 0 to 1; 0 outside the brush.

Note.

Pure, any thread.