pub struct GridSnapshot {
pub transform: GridTransform,
pub chunks: Vec<(IVec3, Vec<u8>)>,
pub chunk_versions: Vec<(IVec3, u64)>,
pub name: Option<String>,
pub render_sky: bool,
pub mip_levels_override: Option<u32>,
pub lod_thresholds: LodThresholds,
pub stream_radius: StreamRadius,
pub voxel_world_size: f64,
}Expand description
One grid’s snapshot: transform + flattened chunks + the grid’s
runtime configuration (QE.5b — pre-QE.5 snapshots restored every
config field to its default, so a loaded save silently lost
render_sky / LOD / streaming settings).
The generator and store hooks are host code and cannot be
serialised — rebind them after Scene::load_snapshot, keyed on
name.
Fields§
§transform: GridTransformThe grid’s world placement (position + rotation).
chunks: Vec<(IVec3, Vec<u8>)>Chunks as (chunk_idx, vxl_bytes). vxl_bytes is
roxlap_formats::vxl::serialize output — re-parseable
via roxlap_formats::vxl::parse.
chunk_versions: Vec<(IVec3, u64)>S7.2: per-chunk edit version counters, sorted by chunk
index. Chunks absent from this list restore as version 0 —
the same as a freshly generated or pre-S7.2 snapshot.
(#[serde(default)] covers self-describing formats; the
wire-format compatibility story is the QE.5b envelope
version in Scene::save_snapshot.)
name: Option<String>QE.5b — the grid’s host-assigned rebind tag (crate::Grid::name).
render_sky: boolQE.5b — crate::Grid::render_sky.
mip_levels_override: Option<u32>QE.5b — crate::Grid::mip_levels_override.
lod_thresholds: LodThresholdsQE.5b — crate::Grid::lod_thresholds.
stream_radius: StreamRadiusQE.5b — crate::Grid::stream_radius.
voxel_world_size: f64SC.snap (v2) — the grid’s GridTransform::voxel_world_size. Stored
as a sibling field (not inside the transform, whose wire form stays
frozen with #[serde(skip)]). The #[serde(default)] covers
self-describing formats; the bincode positional gap between v1 and v2
is handled by the private GridSnapshotV1 shadow shape + the version
dispatch in Scene::load_snapshot. v1 blobs restore this at 1.0.
Trait Implementations§
Source§impl Clone for GridSnapshot
impl Clone for GridSnapshot
Source§fn clone(&self) -> GridSnapshot
fn clone(&self) -> GridSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GridSnapshot
impl Debug for GridSnapshot
Source§impl<'de> Deserialize<'de> for GridSnapshot
impl<'de> Deserialize<'de> for GridSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GridSnapshot
impl RefUnwindSafe for GridSnapshot
impl Send for GridSnapshot
impl Sync for GridSnapshot
impl Unpin for GridSnapshot
impl UnsafeUnpin for GridSnapshot
impl UnwindSafe for GridSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more