pub struct PointLight(/* private fields */);Expand description
A light from a point (WinUI Microsoft.UI.Composition.PointLight):
a point of a visual is lit by the cosine of the angle of the light to
the visual, weakened by the attenuation of the distance
1 / (constant + linear * d + quadratic * d^2) between the minimum and
the maximum cutoff. Every member but CoordinateSpace is animatable.
Implementations§
Source§impl PointLight
impl PointLight
Sourcepub fn from_light(light: &Rc<CompositionLight>) -> Option<PointLight>
pub fn from_light(light: &Rc<CompositionLight>) -> Option<PointLight>
The handle of light as this class, if it is one.
Sourcepub fn props(&self) -> &PointLightProps
pub fn props(&self) -> &PointLightProps
The generated properties of the class.
Source§impl PointLight
impl PointLight
pub fn set_color(&self, value: Color)
Sourcepub fn constant_attenuation(&self) -> f32
pub fn constant_attenuation(&self) -> f32
The constant term of the attenuation (default 1).
pub fn set_constant_attenuation(&self, value: f32)
Sourcepub fn linear_attenuation(&self) -> f32
pub fn linear_attenuation(&self) -> f32
The term of the attenuation proportional to the distance (default 0).
pub fn set_linear_attenuation(&self, value: f32)
Sourcepub fn quadratic_attenuation(&self) -> f32
pub fn quadratic_attenuation(&self) -> f32
The term of the attenuation proportional to the square of the distance (default 0).
pub fn set_quadratic_attenuation(&self, value: f32)
Sourcepub fn coordinate_space(&self) -> Option<Rc<CompositionVisual>>
pub fn coordinate_space(&self) -> Option<Rc<CompositionVisual>>
The visual whose coordinates Offset is in; None for the targeted
visual.
pub fn set_coordinate_space(&self, value: Option<Rc<CompositionVisual>>)
Sourcepub fn offset(&self) -> Vector3D
pub fn offset(&self) -> Vector3D
The position of the light in its coordinate space; Z is the height above the visuals.
pub fn set_offset(&self, value: Vector3D)
pub fn set_intensity(&self, value: f32)
Sourcepub fn min_attenuation_cutoff(&self) -> f32
pub fn min_attenuation_cutoff(&self) -> f32
The distance up to which the light is not attenuated (default 0).
pub fn set_min_attenuation_cutoff(&self, value: f32)
Sourcepub fn max_attenuation_cutoff(&self) -> f32
pub fn max_attenuation_cutoff(&self) -> f32
The distance beyond which the light lights nothing (default
f32::MAX).
pub fn set_max_attenuation_cutoff(&self, value: f32)
Trait Implementations§
Source§impl Clone for PointLight
impl Clone for PointLight
Source§impl Deref for PointLight
impl Deref for PointLight
Source§type Target = Rc<CompositionLight>
type Target = Rc<CompositionLight>
Source§fn deref(&self) -> &Rc<CompositionLight>
fn deref(&self) -> &Rc<CompositionLight>
Auto Trait Implementations§
impl !RefUnwindSafe for PointLight
impl !Send for PointLight
impl !Sync for PointLight
impl !UnwindSafe for PointLight
impl Freeze for PointLight
impl Unpin for PointLight
impl UnsafeUnpin for PointLight
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more