pub struct Ground { /* private fields */ }Expand description
The fill, resolved: what the whole holds wherever no place claims a cell.
Implementations§
Source§impl Ground
impl Ground
Sourcepub fn solid(block: &str) -> Ground
pub fn solid(block: &str) -> Ground
A solid site of block, standing alone — for a caller that has no
campaign (a test, a probe).
Sourcepub fn open_flat(top: i64, surface: &str, below: &str) -> Ground
pub fn open_flat(top: i64, surface: &str, below: &str) -> Ground
An open site over one flat surface y, standing alone.
Sourcepub fn is_declared(&self) -> bool
pub fn is_declared(&self) -> bool
True when the plan declares a fill this ground answers for.
Sourcepub fn top(&self, x: i64, z: i64) -> Option<i64>
pub fn top(&self, x: i64, z: i64) -> Option<i64>
The terrain’s surface y in column (x, z), on an open site whose
terrain resolved. A column outside the region reads the nearest edge
column, so a ring standing one cell past the region’s rim still meets
the ground the rim has (DW0826 refuses a claim that leaves the region).
Sourcepub fn fill_block(&self, cell: [i64; 3]) -> Option<&str>
pub fn fill_block(&self, cell: [i64; 3]) -> Option<&str>
The block the whole holds at cell where nothing — no place, no volume
— claims it; None is air.
Sourcepub fn ground_block(&self, cell: [i64; 3], g: i64) -> &str
pub fn ground_block(&self, cell: [i64; 3], g: i64) -> &str
The block a fixed ground cell holds (spec-0098 §2 rule 0) — a ring
cell at or under its ground height g: the surface block at g,
below under it on an open site; the solid fill’s block on a solid
one. Volumes never reach the ring’s ground: it is the terrain continued
to the plot’s edge, block for block.
Sourcepub fn volume_block(
&self,
role: VolumeRole,
cell: [i64; 3],
vol_top: i64,
) -> Option<&str>
pub fn volume_block( &self, role: VolumeRole, cell: [i64; 3], vol_top: i64, ) -> Option<&str>
The block a volume of role is made of when it names none: the fill’s
own block of that kind (spec-0098 §2b). None is air.