Table of Contents

Struct PolylineSegmentHiLoGpu

Namespace
LansMap.Lines
public struct PolylineSegmentHiLoGpu
Inherited Members

Fields

AHi

Coarse half of endpoint A's absolute mercator position, snapped to the PositionGrid lattice.

public Vector2 AHi

Field Value

Vector2

ALo

Fine remainder of endpoint A's absolute mercator position; magnitude below one lattice step.

public Vector2 ALo

Field Value

Vector2

AltA

Endpoint A's height above the ground in normalized mercator units.

public float AltA

Field Value

float

AltB

Endpoint B's height above the ground in normalized mercator units.

public float AltB

Field Value

float

BHi

Coarse half of endpoint B's absolute mercator position, on the same lattice as AHi.

public Vector2 BHi

Field Value

Vector2

BLo

Fine remainder of endpoint B's absolute mercator position; magnitude below one lattice step.

public Vector2 BLo

Field Value

Vector2

ColorRgba

Line color, RGBA one byte per channel, red in the high byte.

public uint ColorRgba

Field Value

uint

Stride

Byte size of one segment, the stride of the buffer the polyline shader reads.

public const int Stride = 48

Field Value

int

WidthPx

Line width in screen px (flat draw) or render-texture px (world draw); 0 hides the segment.

public float WidthPx

Field Value

float

Methods

SetEndpoints(double, double, double, double)

Fills both endpoints from absolute normalized mercator coordinates, splitting all four on the shared HiLoLattice.

public void SetEndpoints(double ax, double ay, double bx, double by)

Parameters

ax double

Endpoint A's absolute mercator X.

ay double

Endpoint A's absolute mercator Y.

bx double

Endpoint B's absolute mercator X.

by double

Endpoint B's absolute mercator Y.

Remarks

Deliberately takes the store's raw doubles and does no folding and no anchor subtraction. Baking either one here is exactly what made every stored position stale the moment the view moved.