aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-terrain-format/src
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-10-31 23:09:07 +0300
committerValentin Popov <valentin@popov.link>2026-10-31 23:09:07 +0300
commitd7c18d4c1ab576e4329a85b4729403fef3c09183 (patch)
tree2d79173006e680136275bf1a7004c610362d91b4 /crates/fparkan-terrain-format/src
parent853d9b115aa3a7e6790c79c17418e0669d322023 (diff)
downloadfparkan-d7c18d4c1ab576e4329a85b4729403fef3c09183.tar.xz
fparkan-d7c18d4c1ab576e4329a85b4729403fef3c09183.zip
fix(render): select terrain LOD from native camera cells
Diffstat (limited to 'crates/fparkan-terrain-format/src')
-rw-r--r--crates/fparkan-terrain-format/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/fparkan-terrain-format/src/lib.rs b/crates/fparkan-terrain-format/src/lib.rs
index 595f4d8..63d21a1 100644
--- a/crates/fparkan-terrain-format/src/lib.rs
+++ b/crates/fparkan-terrain-format/src/lib.rs
@@ -226,6 +226,8 @@ pub enum TerrainLodError {
DuplicateFaceAssignment { face: usize },
/// A source face is absent from every supported terrain slot.
MissingFaceAssignment { face: usize },
+ /// Slot bounds do not form the regular XY cell grid used by terrain rendering.
+ InvalidCellGrid,
/// A checked index calculation overflowed.
IntegerOverflow,
}
@@ -276,6 +278,7 @@ impl std::fmt::Display for TerrainLodError {
Self::MissingFaceAssignment { face } => {
write!(f, "terrain face {face} is not assigned to a supported slot")
}
+ Self::InvalidCellGrid => write!(f, "terrain slots do not form a regular XY cell grid"),
Self::IntegerOverflow => write!(f, "terrain slot index overflow"),
}
}