pub struct SceneLighting {
pub active: bool,
pub ambient_is_authored: bool,
pub ambient: SceneAmbientLight,
pub lights: Vec<SceneLight>,
}Expand description
Resolved lighting state for one logical canvas layer.
Fields§
§active: boolWhether authored lights or ambient overrides are present.
Whether ambient came from an enabled authored AmbientLight.
The default ambient is only applied to primitives with at least one eligible direct light. An authored ambient remains layer-wide.
ambient: SceneAmbientLightSingleton ambient contribution.
lights: Vec<SceneLight>Positional and directional light contributions.
Implementations§
Source§impl SceneLighting
impl SceneLighting
Sourcepub const MAX_LIGHTS: usize = 8
pub const MAX_LIGHTS: usize = 8
Maximum number of simultaneously enabled lights in one target canvas layer.
Sourcepub const DEFAULT_AMBIENT_INTENSITY: f64 = 0.35
pub const DEFAULT_AMBIENT_INTENSITY: f64 = 0.35
Ambient intensity used when point/directional lights exist but no explicit ambient override exists.
Sourcepub fn identity() -> SceneLighting
pub fn identity() -> SceneLighting
Returns lighting that preserves unlit legacy rendering.
Sourcepub fn with_default_ambient(lights: Vec<SceneLight>) -> SceneLighting
pub fn with_default_ambient(lights: Vec<SceneLight>) -> SceneLighting
Creates active lighting with Pax’s default ambient term.
Trait Implementations§
Source§impl Clone for SceneLighting
impl Clone for SceneLighting
Source§fn clone(&self) -> SceneLighting
fn clone(&self) -> SceneLighting
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneLighting
impl Debug for SceneLighting
Source§impl Default for SceneLighting
impl Default for SceneLighting
Source§fn default() -> SceneLighting
fn default() -> SceneLighting
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SceneLighting
impl<'de> Deserialize<'de> for SceneLighting
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SceneLighting, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SceneLighting, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HelperFunctions for SceneLighting
impl HelperFunctions for SceneLighting
Source§fn register_all_functions()
fn register_all_functions()
Registers all helper functions for this type.
Source§impl Interpolatable for SceneLighting
impl Interpolatable for SceneLighting
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl PartialEq for SceneLighting
impl PartialEq for SceneLighting
Source§impl Serialize for SceneLighting
impl Serialize for SceneLighting
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SceneLighting
Source§impl ToPaxValue for SceneLighting
impl ToPaxValue for SceneLighting
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
Converts this value into a
PaxValue.Source§fn nested_properties(&self) -> Vec<UntypedProperty>
fn nested_properties(&self) -> Vec<UntypedProperty>
Live properties read when snapshotting a compound value for PAXEL.
Adapters observe these as well as the containing property.
Source§fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
Converts against owner-thread graph views, including nested generated
property fields. Requires an entered property graph for shared fields.
Ordinary
Self::to_pax_value reads published value snapshots.Auto Trait Implementations§
impl Freeze for SceneLighting
impl RefUnwindSafe for SceneLighting
impl Send for SceneLighting
impl Sync for SceneLighting
impl Unpin for SceneLighting
impl UnsafeUnpin for SceneLighting
impl UnwindSafe for SceneLighting
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> PropertyValue for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.