pub struct PlacedBox {
pub node: NodeId,
pub foot: [i64; 4],
pub floor: i64,
pub clearance: u32,
pub open: bool,
pub base: Base,
pub roof: Option<Roof>,
}Expand description
One place, resolved into world cells: the play space the plan gives it.
Public because three readers need the same answer and two of them are in another crate: the stage-4 checks here, the blockout derivation that builds the mass, and the stage-5 battery that judges the built bytes against the plan. Two of those computing “where is this box” independently is how a builder and its observer come to agree about a world neither of them describes.
Fields§
§node: NodeIdThe place this embeds.
foot: [i64; 4]Inclusive footprint [x0, x1, z0, z1].
floor: i64The walk plane’s world y.
clearance: u32Cells of headroom over the walk plane.
open: boolTrue when the plan declared the place sky-open — a courtyard, a shore,
a summit. It claims exactly its declared courses of air (which is what
PlacedBox::clearance holds); what it makes no claim on is the air
above them.
base: BaseWhat it stands on: the site’s ground, or hung n courses under its
floor course (spec-0098 §2).
roof: Option<Roof>The roof the plan reserves over this place (spec-0098 §3), when it
declares one. Never present on an open box (DW0988).
Implementations§
Source§impl PlacedBox
impl PlacedBox
Sourcepub fn shell_top(&self) -> i64
pub fn shell_top(&self) -> i64
The highest course of the shell: the lid on a roofed place, the top of the play space on an open one.
Sourcepub fn roof_zone(&self) -> Option<Aabb>
pub fn roof_zone(&self) -> Option<Aabb>
The roof zone the plan declares, before any neighbour clips its eaves:
the shell footprint grown by eaves on every horizontal side, from the
ceiling course up courses courses. None when no roof is declared or
the place is open.
Sourcepub fn floor_course_y(&self) -> i64
pub fn floor_course_y(&self) -> i64
The floor course’s world y.
Sourcepub fn is_ring_column(&self, x: i64, z: i64) -> bool
pub fn is_ring_column(&self, x: i64, z: i64) -> bool
True when (x, z) is one of the ring’s columns: inside the shell
footprint and outside the play space’s.