Skip to main content

DistantLightProps

Struct DistantLightProps 

Source
pub struct DistantLightProps { /* private fields */ }
Expand description

The UI-thread properties of DistantLight.

Implementations§

Source§

impl DistantLightProps

Source

pub fn new() -> Self

Creates the properties with every field at the default of its type. The defaults of the schema are applied by initialize_defaults.

Source

pub fn base(&self) -> &CompositionLightProps

The properties of the base class.

Source

pub fn initialize_defaults(&self, host: &dyn DistantLightHooks)

The InitializeDefaults calls of the constructor chain: the base classes first, then this class.

Source

pub fn initialize_own_defaults(&self, host: &dyn DistantLightHooks)

InitializeDefaults of this class alone.

Source

pub fn color(&self) -> Color

Color (animated, default crate::media::Colors::WHITE, FerroUI overlay).

Source

pub fn set_color(&self, host: &dyn DistantLightHooks, value: Color)

Sets Color (animated, default crate::media::Colors::WHITE, FerroUI overlay).

Source

pub fn coordinate_space(&self) -> Option<Rc<dyn ICompositionObject>>

CoordinateSpace (FerroUI overlay).

Source

pub fn set_coordinate_space( &self, host: &dyn DistantLightHooks, value: Option<Rc<dyn ICompositionObject>>, )

Sets CoordinateSpace (FerroUI overlay).

Source

pub fn direction(&self) -> Vector3D

Direction (animated, default Vector3D::new(0.0, 0.0, -1.0), FerroUI overlay).

Source

pub fn set_direction(&self, host: &dyn DistantLightHooks, value: Vector3D)

Sets Direction (animated, default Vector3D::new(0.0, 0.0, -1.0), FerroUI overlay).

Source

pub fn intensity(&self) -> f32

Intensity (animated, default 1.0, FerroUI overlay).

Source

pub fn set_intensity(&self, host: &dyn DistantLightHooks, value: f32)

Sets Intensity (animated, default 1.0, FerroUI overlay).

Source

pub fn start_animation( &self, host: &dyn DistantLightHooks, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, ) -> bool

Connects an animation with the named property. Returns false when neither this class nor its generated bases have an animated property of that name: the caller continues with its hand-written base.

Source

pub fn serialize_changes_core( &self, host: &dyn DistantLightHooks, writer: &mut BatchStreamWriter<'_>, )

Writes the changes of the object: the base class first, then the changed-fields mask and the changed members of this class.

Trait Implementations§

Source§

impl Default for DistantLightProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.