Struct PolylineSegmentHiLoGpu
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
AltB
Endpoint B's height above the ground in normalized mercator units.
public float AltB
Field Value
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
CornerRadiusRatio
Corner radius of the joins and caps as a fraction of the half width, 0 (miter, butt) to 1 (round).
public float CornerRadiusRatio
Field Value
DashPeriod
Positive is screen px, or render-texture px on the world path; negative is normalized mercator; 0 draws solid.
public float DashPeriod
Field Value
DistMercA
Chain-unwrapped mercator path length from the line's first vertex to endpoint A, narrowed from the store's double. Screen px per mercator unit at zoom 16 is about 16.7 million, so a world- circling trail carries about 1 px of phase error here - invisible; a 100 km line carries about 0.003 px. A set sign bit marks a flat segment (PackedDistMercA); read it with a bit test, not a sign comparison, since the first segment of a flat line packs as negative zero.
public float DistMercA
Field Value
Flags
Reserved flag word, zero today and read by nothing; keeps the stride 8-aligned until a future field needs real bits here.
public uint Flags
Field Value
NextSlotOffset
Slot offset of the segment that starts at this segment's B, relative to this slot; 0 when B ends the line (a cap).
public int NextSlotOffset
Field Value
PrevSlotOffset
Slot offset of the segment that ends at this segment's A, relative to this slot; 0 when A starts the line (a cap).
public int PrevSlotOffset
Field Value
Stride
Byte size of one segment, the stride of the buffer the polyline shader reads.
public const int Stride = 72
Field Value
WidthPx
Line width in screen px (flat draw) or render-texture px (world draw); negative marks a screen-dashed line whose dash ignores pitch; 0 hides the segment.
public float WidthPx
Field Value
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
axdoubleEndpoint A's absolute mercator X.
aydoubleEndpoint A's absolute mercator Y.
bxdoubleEndpoint B's absolute mercator X.
bydoubleEndpoint 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.