CorePlotting::MappedLineView
CorePlotting::MappedLineView
Lazy view over a mapped polyline. More…
#include <MappedLineView.hpp>
Public Functions
| Name | |
|---|---|
| MappedLineView(EntityId id, VertexRange vertex_range) Construct a line view from an existing vertex range. |
|
| auto | vertices() const Get the vertex range for iteration. |
| auto | vertices() Get the vertex range for iteration (non-const). |
Public Attributes
| Name | |
|---|---|
| EntityId | entity_id Entity identifier for the entire line. |
Detailed Description
template <std::ranges::input_range VertexRange>
class CorePlotting::MappedLineView;Lazy view over a mapped polyline.
Template Parameters:
- VertexRange Type of the underlying vertex range (satisfies [MappedVertexRange])
Provides zero-copy iteration over line vertices with layout transforms applied on-the-fly. This enables single-traversal rendering and spatial indexing without materializing intermediate vertex buffers.
Usage: ```cpp
// From Line2D with spatial mapping auto line_view = MappedLineView{entity_id, line.begin(), line.end(), layout}; for (auto vertex : line_view.vertices()) { gpu_buffer.push_back(vertex.x); gpu_buffer.push_back(vertex.y); }
## Public Functions Documentation
### function MappedLineView
```cpp
inline MappedLineView(
EntityId id,
VertexRange vertex_range
)
Construct a line view from an existing vertex range.
Parameters:
- id Entity identifier for this line
- vertex_range Pre-computed or lazily-transformed vertex range
function vertices
inline auto vertices() constGet the vertex range for iteration.
Return: Range of MappedVertex (or [MappedVertexLike]) elements
function vertices
inline auto vertices()Get the vertex range for iteration (non-const).
Public Attributes Documentation
variable entity_id
EntityId entity_id;Entity identifier for the entire line.
Updated on 2026-11-13 at 20:25:42 +0000