Skip to content

Commit

Permalink
Generalize GridArray into Vol which allows borrowed data.
Browse files Browse the repository at this point in the history
Future work: allow more orderings (only the useful ones) and migrate
away from the `GridArray` type (now a type alias).
  • Loading branch information
kpreid committed Sep 17, 2023
1 parent c6515b8 commit 1128553
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 76 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
- `space::Space::draw_target()`
- `space::SpaceTransaction::draw_target()`

- `math::GridArray` is now `math::Vol` and allows choice of the data container type.

- `camera::HeadlessRenderer` now returns a custom image container type `Rendering` instead of using `image::RgbaImage`.
(This way, no dependency on `image` is needed.)

Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes/src/block/evaluated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ impl Evoxels {
pub(crate) fn iter_mut(&mut self) -> impl Iterator<Item = &'_ mut Evoxel> {
match self {
Evoxels::One(v) => core::slice::from_mut(v).iter_mut(),
Evoxels::Many(_, voxels) => voxels.elements_mut().iter_mut(),
Evoxels::Many(_, voxels) => voxels.as_linear_mut().iter_mut(),
}
}

Expand Down
Loading

0 comments on commit 1128553

Please sign in to comment.