Orrery Terrain · OrreryTerrainCore module · function
Native::
GradeAlong
Rise over run of the ground along a horizontal direction, a central difference one edit cell either side of the point.
Declaration
double GradeAlong(const FGroundQuery& Query, double X, double Y, double DirX, double DirY,
ESurface Surface, EPrecision& OutPrecision);- Header
#include "Native/GroundSampling.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainCore");in your module’s Build.cs.- Stability
- Stable: changes within a major version only add.
- Thread
- Any thread, lock-free.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Query | const FGround | — | The snapshot to read. |
X | double | — | Position, world metres. |
Y | double | — | Position, world metres. |
DirX | double | — | Horizontal direction; need not be unit, only its XY direction counts. |
DirY | double | — | Horizontal direction; need not be unit, only its XY direction counts. |
Surface | ESurface | — | Which ground. |
OutPrecision | EPrecision& | — | Worst precision of the heights read; NoData (and a result of 0) when the point has no ground or the direction is zero. |
Returns
dZ/ds, positive uphill along the direction (0.1 = 10 %).
Note.
Any thread, lock-free.