pub struct SelectLod {
pub choice: LodChoice,
}Expand description
select-lod{form=finest|default|N} (form required: which level of detail is drawn is the program’s choice):
every prototype with Lods is left with the one form Lods::choose takes (with default, the finest where the source authored no default, counted as an
approximation). Another form than its own takes the prototype’s own geometry away with everything that describes
it (World::remove_mesh: core.mesh, core.mesh_file and every per-primitive component, dialect data
included, so nothing describing the discarded form stays behind when the chosen form lacks it), then every
component the form holds replaces the prototype’s of that name (World::move_components), so the form’s
dialect data travels with it without the pass knowing it, except what stays with the prototype (core.name,
core.source, core.collision: the form’s own are left behind, counted); a form that draws nothing leaves the
prototype without a mesh. The other forms are despawned and core.lods removed. The whole selection is checked before anything
changes: an invalid one (a prototype drawn with another form while it holds an opaque component, which can’t be
told to follow, among them) is an error and leaves the world as it was.
Fields§
§choice: LodChoiceTrait Implementations§
impl Copy for SelectLod
impl Eq for SelectLod
Source§impl Pass for SelectLod
impl Pass for SelectLod
Source§fn removes(&self) -> &[&'static str]
fn removes(&self) -> &[&'static str]
A prototype drawn with another form loses its own mesh and variants (and keeps the form’s).
Source§fn removes_by_log(&self) -> bool
fn removes_by_log(&self) -> bool
The per-primitive data of a prototype’s own form (World::remove_mesh) is whatever its reader attached; each
name taken from a prototype the chosen form doesn’t give back is recorded.
Source§fn options(&self) -> Options
fn options(&self) -> Options
Source§fn modifies(&self) -> &[&'static str]
fn modifies(&self) -> &[&'static str]
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 despawns_entities(&self) -> bool
fn despawns_entities(&self) -> bool
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 approximates(&self) -> &'static str
fn approximates(&self) -> &'static str
fn run(&self, w: &mut World, log: &mut PassLog) -> Result<(), String>
Source§fn may_lack_inputs(&self) -> bool
fn may_lack_inputs(&self) -> bool
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]
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 settles(&self) -> &[&'static str]
fn settles(&self) -> &[&'static str]
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 SelectLod
Auto Trait Implementations§
impl Forget for SelectLod
impl Freeze for SelectLod
impl RefUnwindSafe for SelectLod
impl Send for SelectLod
impl Sync for SelectLod
impl Unpin for SelectLod
impl UnsafeUnpin for SelectLod
impl UnwindSafe for SelectLod
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.