Expand description
The world-space line segment any system can submit for a frame: a trajectory arc, a tether or beam, a patrol path, the editor’s origin axes. Lines are scene geometry, not overlay, so the depth-tested pass occludes them behind whatever is in front of them.
build_vertices expands each segment into the camera-facing ribbon the
line pass rasterises.
Structs§
- Line
- One world-space line to draw this frame. Colour is per endpoint, so a line that fades out with distance is a single request with a transparent far end.
- Line
Camera - The camera the expansion projects against.
viewis the world-to-view matrix the frame renders with (column-major,view[col][row]) andcam_posits world-space position: in a camera-relative world both are the rebased pair, so callers must express their lines in that same space.
Functions§
- build_
vertices - Expand
linesinto the ribbon triangles the line pass draws. Segments wholly behind the near plane, degenerate segments, and fully transparent segments contribute nothing, so an empty result means the pass can be skipped entirely. - build_
vertices_ into build_vertices, writing intoout(cleared first) so a per-frame caller reuses its buffer.