Table of Contents

Struct MarkerInstanceHiLoGpu

Namespace
LansMap.Markers.Bulk
public struct MarkerInstanceHiLoGpu
Inherited Members

Fields

AltMerc

Height above the ground in normalized mercator units.

public float AltMerc

Field Value

float

ColorRgba

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

public uint ColorRgba

Field Value

uint

Mode

Size mode, shape id, and the flat/SDF/disabled/ignore-zoom-range flag bits.

public uint Mode

Field Value

uint

OutlineRgba

Outline color, RGBA one byte per channel; 0 selects the layer-wide outline color.

public uint OutlineRgba

Field Value

uint

PosHi

Coarse half of the absolute mercator position, snapped to the PositionGrid lattice.

public Vector2 PosHi

Field Value

Vector2

PosLo

Fine remainder of the absolute mercator position; magnitude below one PositionGrid step.

public Vector2 PosLo

Field Value

Vector2

PositionGrid

Steps per world that PosHi is snapped to. One step is about 38 m at the equator.

public const double PositionGrid = 1048576

Field Value

double

RotationDeg

Shape rotation, degrees; see RotationDeg for direction. 0 is unrotated.

public float RotationDeg

Field Value

float

SizeParam

Screen px or ground meters depending on the size mode packed into Mode; 0 hides the marker.

public float SizeParam

Field Value

float

StemColorRgba

Stem color, RGBA one byte per channel; 0 selects the layer-wide stem color.

public uint StemColorRgba

Field Value

uint

StemWidthPx

Stem width in screen px; 0 selects the layer-wide stem width.

public float StemWidthPx

Field Value

float

Stride

Byte size of one instance, the stride of the buffer the marker shader reads.

public const int Stride = 48

Field Value

int

Methods

Split(double, out float, out float)

Splits one absolute normalized mercator coordinate into the hi/lo pair this struct stores.

public static void Split(double mercator, out float hi, out float lo)

Parameters

mercator double

Absolute normalized mercator coordinate, one world spanning 0 to 1.

hi float

Coarse half, snapped down to the PositionGrid lattice.

lo float

Fine remainder, at or above 0 and below one grid step.

Remarks

Both halves must come from this one method, positions and anchor alike: the shader's exact-subtraction property holds only while every hi it sees sits on the same lattice.