Skip to content
Brass Orrery

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

NameTypeDefaultMeaning
Queryconst FGroundQuery&—

The snapshot to read.

Xdouble—

Position, world metres.

Ydouble—

Position, world metres.

DirXdouble—

Horizontal direction; need not be unit, only its XY direction counts.

DirYdouble—

Horizontal direction; need not be unit, only its XY direction counts.

SurfaceESurface—

Which ground.

OutPrecisionEPrecision&—

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.