Orrery Terrain · OrreryTerrainCore module · struct
Native::
FBrushMaskDab
ExperimentalOne dab's sampler state, prepared once per dab by PrepareBrushMaskDab and read per post.
Declaration
struct FBrushMaskDab- Header
#include "Native/BrushMask.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainCore");in your module’s Build.cs.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
Description
A post's offset from the brush centre (mm) becomes the mask's local position in Q16 millimetres (Local), then M (SampleBrushMask). Every step is integer, and a post's value depends on its offset alone, never on the window or the order the posts are visited in.
Functions
- Local
The mask's local position of a post at offset (Dx_mm, Dy_mm) from the brush centre: rotated by -MaskAngle, mirrored when asked, in Q16 millimetres (floored).
- SquareT_q16
The square footprint's normalised distance in Q16: max(|X| / HalfX, |Y| / HalfY), at most 65536, with no root.
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
Mask | const FBrush | nullptr | — |
Texels | const uint16_ | nullptr | The sampled level's u. |
Side | int32_ | 0 | Samples per side of the sampled level. |
Level | uint32_ | 0 | — |
Cos_ | int64_ | int64_ | — |
Sin_ | int64_ | 0 | — |
b | bool | false | — |
b | bool | false | kBrushMaskBicubic: sampled by the Catmull-Rom cubic instead of bilinearly (SampleBrushMask). |
Half | int64_ | 0 | The mask's half-sides on the ground (BrushMaskHalfSides): the aspect ratio scales the mask before the rotation. |
Half | int64_ | 0 | — |
Half | int64_ | 0 | — |
Half | int64_ | 0 | — |
Tol_ | int64_ | 0 | How far outside the half-sides a position still counts as inside: covers the CORDIC's error. |
Scale | int64_ | 0 | Level samples per Q16 mm along local X, << kBrushMaskScaleShift. |
Scale | int64_ | 0 | — |
Inv | int64_ | 0 | 2^kBrushMaskInvShift / HalfX_mm, rounded. |
Inv | int64_ | 0 | — |