Expand description
Multi-chunk edit API on Grid.
Region-shape edit operations (Grid::set_voxel,
Grid::set_rect, Grid::set_sphere) take grid-local voxel
coordinates spanning any number of chunks. The implementation:
- Computes the chunk index range the operation touches.
- For each chunk in that range, intersects the edit region with the chunk’s voxel footprint and translates to chunk-local coordinates.
- Calls the corresponding
roxlap_formats::editprimitive with the per-chunk slice of the edit.
Implicit-air chunks are materialised on demand via
Grid::ensure_chunk when the operation inserts voxels
(color = Some(_)); pure-carve operations (color = None)
skip materialisation for chunks that don’t already exist —
carving from already-air voxels is a no-op.
Enums§
- SpanOp
- Re-export of
roxlap_formats::edit::SpanOpso scene callers can name the add-vs-carve flag without depending onroxlap-formatsdirectly. Used byGrid::set_sphere_with_colfunc/Grid::set_rect_with_colfunc. Operation for span-style edits.
Functions§
- voxel_
at - Convenience: forward a
GridLocalPos-style decomposition back tovoxel_globalfor callers that already hold one. Stays here rather than incrate::addrbecause it’s only useful in the edit-API call shape.