pub struct Part {
pub roots: BTreeSet<Entity>,
pub shared: BTreeSet<Entity>,
pub context: BTreeSet<Entity>,
pub whole: bool,
pub area: Option<[f64; 4]>,
}Expand description
One part to load: the roots it outputs, and the context its passes need around them (neighbouring placements a
collision or normal operation reads). The reader loads both; only the roots’ closure, with what the passes placed
for it, goes to the writer, so content a part only reads is written by the part that owns it. The passes see which
is which in the part’s PartScope; content they make from a context entity (crate::pass::PassLog::place_from)
is left to the part that owns that entity.
Fields§
§roots: BTreeSet<Entity>Entities the part writes a share of and another part owns (a placement whose elements are divided among the
parts holding them): loaded and output with the roots, but content its passes make from them
(crate::pass::PassLog::place_from) is their owner’s, left to it as content made from the context is, so it is
written once whatever the division.
context: BTreeSet<Entity>§whole: boolWhether this part is the whole of what is written: every selected entity, nothing in another part. Stated by the source (no default): an operation that needs the whole refuses a part that is not.
area: Option<[f64; 4]>The ground area [west, south, east, north] (metres, half-open) its context covers: every placement and world
collision that reaches it is loaded (roots or context), so an operation reading the world around its own content
(a marker’s search for ground) can tell whether the part holds all of it. None: the source states none (the
whole world, or a source that does not plan by area).