Skip to main content

IServerCompositionLight

Trait IServerCompositionLight 

Source
pub trait IServerCompositionLight {
    // Required methods
    fn light_props(&self) -> &ServerCompositionLightProps;
    fn light_state(&self) -> &ServerLightState;
    fn is_disposed(&self) -> bool;
    fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>;
    fn source(&self) -> LightSource;

    // Provided method
    fn target_of(
        &self,
        visual: &ServerCompositionVisual,
    ) -> Option<Rc<ServerCompositionVisual>> { ... }
}
Expand description

What every server-side light has: the properties of CompositionLight, where it shines from and what it lights.

Required Methods§

Source

fn light_props(&self) -> &ServerCompositionLightProps

The properties of CompositionLight.

Source

fn light_state(&self) -> &ServerLightState

The bookkeeping of what the light lit.

Source

fn is_disposed(&self) -> bool

Source

fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>

The visual whose coordinates the light is in; None for the targeted visual (and for an ambient light, which has no position).

Source

fn source(&self) -> LightSource

The light in its coordinate space.

Provided Methods§

Source

fn target_of( &self, visual: &ServerCompositionVisual, ) -> Option<Rc<ServerCompositionVisual>>

Whether visual is lit by the light: in the subtree of a target and not in the subtree of an exclusion (an exclusion that is also a target is excluded). The target, if it is.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§