pub struct LocalShadowChoice {
pub enabled: bool,
pub max_distance: Option<f32>,
pub max_lights: Option<usize>,
pub order: ShadowOrder,
}Expand description
The options of the choice: off (no light shadowed, every light lit unshadowed), or the lights of the shadowed table’s
kind whose core.light says they cast shadows and that have a range, whose range sphere meets the view’s frustum
and, where max_distance is set, comes within that many metres of the eye, taken in order up to the atlas’s
capacity and, where it is set, max_lights. Each option changes what is drawn, so each is the consumer’s to state:
there is no default, and deserialising requires every field, null for no limit included.
Fields§
§enabled: bool§max_distance: Option<f32>§max_lights: Option<usize>§order: ShadowOrderImplementations§
Source§impl LocalShadowChoice
impl LocalShadowChoice
Sourcepub fn most(
&self,
world: &World,
kind: LightTableKind,
capacity: usize,
) -> usize
pub fn most( &self, world: &World, kind: LightTableKind, capacity: usize, ) -> usize
The most lights this choice can shadow in world with an atlas of capacity: 0 when off, else the capacity,
no more than the world’s shadow-casting lights of kind with a range, nor max_lights.
Sourcepub fn describe(&self, capacity: usize) -> String
pub fn describe(&self, capacity: usize) -> String
The choice in words, for a consumer’s report.
Sourcepub fn choose(
&self,
world: &World,
kind: LightTableKind,
view: &ShadowView,
capacity: usize,
) -> ChosenShadows
pub fn choose( &self, world: &World, kind: LightTableKind, view: &ShadowView, capacity: usize, ) -> ChosenShadows
The lights of kind in world this choice shadows for view, at most capacity, in the choice’s order.