Skip to main content

Module overlay3d

Module overlay3d 

Source
Expand description

2D overlay pass drawn over depth-tested 3D geometry.

The Earth reference draws graticules, contours, trajectories, waypoints, reticles, and labels as 2D primitives after the 3D pass. They share the 3D camera projection, so a projected anchor lands on the same pixel as the mesh vertex it annotates, and everything is clipped to the viewport.

The pass is split in two on purpose:

  1. Projection: scene-space anchors are projected with the f64 frame and reduced to screen-space commands. This step is deterministic and pure, so tests can assert anchor accuracy without reading pixels.
  2. Rasterization: the commands are drawn into a FrameBuffer.

Structs§

Overlay3D
Overlay primitives plus an optional screen-space clip rectangle.
OverlayTextStyle
Text styling for an overlay label.

Enums§

LabelAnchor
Placement of a label relative to its projected anchor.
MarkerKind
A marker glyph drawn at a projected anchor.
OverlayCommand
A projected, screen-space overlay command.
OverlayPrimitive
A scene-space overlay primitive.

Functions§

draw_text
Draws text with the built-in 8x16 cell font, scaled by integer steps.
rasterize_overlay
Rasterizes projected overlay commands into frame_buffer, clipped to clip when present and to viewport always. Labels are drawn with the built-in glyph rasterizer.
rasterize_overlay_with_text
Rasterizes projected overlay commands with an explicit text rasterizer.
text_size
Screen size of a text run in the 8x16 glyph cell.

Type Aliases§

TextRasterizer
Signature of a text rasterizer installed by the platform layer.