pub struct PlaceSpawn { /* private fields */ }Expand description
place-spawn{at=centre | east=E,north=N}[,yaw=DEGREES]}: a core.marker of kind spawn at a ground position
(its height left to the consumer, which snaps it), facing yaw (Marker::yaw). The caller states where; a
world whose source already places a spawn is refused (the source’s own stands). It runs as a selection pass, on
the world a writer plans from, so one spawn serves every part of a conversion; the marker is content of its own
(PassLog::place). Made by PlaceSpawn::centre or PlaceSpawn::at_ground, facing PlaceSpawn::with_yaw;
from options by the same calls.
Implementations§
Source§impl PlaceSpawn
impl PlaceSpawn
Sourcepub fn centre() -> PlaceSpawn
pub fn centre() -> PlaceSpawn
A spawn at the median of the placements’ ground positions.
Sourcepub fn at_ground(east: f32, north: f32) -> Result<PlaceSpawn, String>
pub fn at_ground(east: f32, north: f32) -> Result<PlaceSpawn, String>
A spawn at this ground position; finite metres.
Sourcepub fn with_yaw(self, degrees: f32) -> Result<PlaceSpawn, String>
pub fn with_yaw(self, degrees: f32) -> Result<PlaceSpawn, String>
Facing degrees (finite) about the up axis (Marker::yaw).
pub fn at(&self) -> SpawnAt
pub fn yaw(&self) -> Option<f32>
Trait Implementations§
Source§impl Clone for PlaceSpawn
impl Clone for PlaceSpawn
impl Copy for PlaceSpawn
Source§impl Debug for PlaceSpawn
impl Debug for PlaceSpawn
Source§impl PartialEq for PlaceSpawn
impl PartialEq for PlaceSpawn
Source§impl Pass for PlaceSpawn
impl Pass for PlaceSpawn
Source§fn options(&self) -> Options
fn options(&self) -> Options
The options this instance was made with (printed into the pipeline).
fn run(&self, w: &mut World, log: &mut PassLog) -> Result<(), String>
Source§fn may_lack_inputs(&self) -> bool
fn may_lack_inputs(&self) -> bool
Whether a run may skip it in a world (or a part) that holds none of its required names: a lowering whose input
the world may simply not have (a part of only a light has no materials, a read region no lights) opts in;
the step is recorded as skipped (
StepReport::skipped). Required names are prerequisites, so this is false
unless the pass says otherwise: an absent name may be a failed load or a wrong order, and a pass that
summarizes, decides or plans never opts in.Source§fn settings(&self) -> &[Setting]
fn settings(&self) -> &[Setting]
The run settings it reads, which the program states for the run on its manager (its thread count,
crate::parallel::THREADS, PassManager::with_settings): checked with Pass::requires before it runs and
refused where absent, never counted in whether it is skipped (Pass::may_lack_inputs), and stated in its
step’s report.Source§fn modifies(&self) -> &[&'static str]
fn modifies(&self) -> &[&'static str]
Names whose values it edits in place, and resources it writes (replaced, also by removing and inserting again,
or borrowed with
World::resource_mut). The pass manager checks the resources; an in-place edit of a
component’s value on an entity that keeps it (get_mut, or World::insert over the value) is declared here
and not checked: seeing it would take a controlled editing interface, later work. What the gap costs: a pass that
edits a value in place without declaring it here is never named, in any build, and its edit can make what the
declarations say about that name wrong (Pipeline::unfed, Pipeline::check); one that leaves an invalid value there is named at the pass in a build with the
pass checks, and in a release build without them only by the verifier that runs before the writer, which names the
entity but not the pass. Adding a name to an entity, taking one away and despawning are checked entity by entity
against Pass::provides, Pass::removes and Pass::despawns_entities.Source§fn approximates(&self) -> &'static str
fn approximates(&self) -> &'static str
What it approximates, in words (empty when it is exact).
Source§fn despawns_entities(&self) -> bool
fn despawns_entities(&self) -> bool
Whether it despawns entities. If so, a component name it does not declare in
Pass::removes may disappear
when every entity that held the name before the pass was despawned by it (a dropped placement’s
core.name, a discarded form’s dialect data); a name still held by a surviving entity before the pass must
be declared as ever. Added names are checked as for every pass.Source§fn removes_by_log(&self) -> bool
fn removes_by_log(&self) -> bool
Whether the components it removes are not all known in advance (a hook decides, as
crate::Component::apply_linear does). If so, a component name that disappears is accepted when the pass
recorded it in PassLog::removed as well as when it is declared in Pass::removes; a name that disappears
unrecorded and undeclared is an error as ever, and a resource it removes must be declared as for any pass.Source§fn settles(&self) -> &[&'static str]
fn settles(&self) -> &[&'static str]
Names whose values it brings to their final form (a classifier: every surface classified). A later pass in a
pipeline that provides one of them adds values that never went through this pass: unless a pass after it settles
the name again,
PassManager::run refuses such a pipeline before it runs (Error::SettledThenChanged).
Modifying settled values later is allowed. A modifier must not add
values without declaring them in Pass::provides; the target’s value rules check the result.impl StructuralPartialEq for PlaceSpawn
Auto Trait Implementations§
impl Forget for PlaceSpawn
impl Freeze for PlaceSpawn
impl RefUnwindSafe for PlaceSpawn
impl Send for PlaceSpawn
impl Sync for PlaceSpawn
impl Unpin for PlaceSpawn
impl UnsafeUnpin for PlaceSpawn
impl UnwindSafe for PlaceSpawn
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
Mutably borrows from an owned value. Read more