pub struct SpringVector3NaturalMotionAnimation { /* private fields */ }Expand description
A spring animation of Vector3 values (WinUI SpringVector3NaturalMotionAnimation): each component moves on a damped harmonic oscillator of the given damping ratio and period.
Implementations§
Source§impl SpringVector3NaturalMotionAnimation
impl SpringVector3NaturalMotionAnimation
pub fn new( compositor: &Rc<Compositor>, ) -> Rc<SpringVector3NaturalMotionAnimation>
Sourcepub fn damping_ratio(&self) -> f32
pub fn damping_ratio(&self) -> f32
The damping ratio of the spring: 1 (the default) comes to rest as fast as possible without overshooting, less overshoots and oscillates, more comes to rest slower; 0 oscillates forever.
Sourcepub fn set_damping_ratio(&self, value: f32)
pub fn set_damping_ratio(&self, value: f32)
Sets the damping ratio. Panics when it is negative or not a number.
Sourcepub fn period(&self) -> Duration
pub fn period(&self) -> Duration
The period of the oscillation of the spring without damping; a shorter period is a stiffer spring.
Sourcepub fn set_period(&self, value: Duration)
pub fn set_period(&self, value: Duration)
Sets the period. Panics when it is zero.
Methods from Deref<Target = Vector3NaturalMotionAnimation>§
Sourcepub fn final_value(&self) -> Option<Vector3>
pub fn final_value(&self) -> Option<Vector3>
The value the motion comes to rest at. When None, an
implicit animation moves to the new value of the property
(this.FinalValue), and an explicit one to the current value.
pub fn set_final_value(&self, value: Option<Vector3>)
Sourcepub fn initial_value(&self) -> Option<Vector3>
pub fn initial_value(&self) -> Option<Vector3>
The value the motion starts from; the current value of the
property when None.
pub fn set_initial_value(&self, value: Option<Vector3>)
Sourcepub fn initial_velocity(&self) -> Vector3
pub fn initial_velocity(&self) -> Vector3
The velocity the motion starts with, in units of the property per second.
pub fn set_initial_velocity(&self, value: Vector3)
Methods from Deref<Target = NaturalMotionAnimation>§
Sourcepub fn delay_behavior(&self) -> AnimationDelayBehavior
pub fn delay_behavior(&self) -> AnimationDelayBehavior
Whether the property takes the initial value before the delay
(SetInitialValueBeforeDelay) or when the motion starts.
pub fn set_delay_behavior(&self, value: AnimationDelayBehavior)
Sourcepub fn delay_time(&self) -> Duration
pub fn delay_time(&self) -> Duration
The delay between the start of the animation and the start of the motion.
pub fn set_delay_time(&self, value: Duration)
Sourcepub fn stop_behavior(&self) -> AnimationStopBehavior
pub fn stop_behavior(&self) -> AnimationStopBehavior
The value the property is set to when the animation is stopped with
StopAnimation.
pub fn set_stop_behavior(&self, value: AnimationStopBehavior)
Methods from Deref<Target = CompositionAnimation>§
Sourcepub fn object(&self) -> &CompositionObject
pub fn object(&self) -> &CompositionObject
The embedded CompositionObject.
Sourcepub fn compositor(&self) -> &Rc<Compositor>
pub fn compositor(&self) -> &Rc<Compositor>
The associated compositor.
Sourcepub fn clear_all_parameters(&self)
pub fn clear_all_parameters(&self)
Clears all of the parameters of the animation.
Sourcepub fn clear_parameter(&self, key: &str)
pub fn clear_parameter(&self, key: &str)
Clears a parameter from the animation.
Sourcepub fn set_boolean_parameter(&self, key: &str, value: bool)
pub fn set_boolean_parameter(&self, key: &str, value: bool)
Sets a boolean value parameter for use with an expression animation or an expression key frame.
pub fn set_color_parameter(&self, key: &str, value: Color)
Sourcepub fn set_expression_reference_parameter(
&self,
key: &str,
animation_object: Rc<dyn AsCompositionObject>,
)
pub fn set_expression_reference_parameter( &self, key: &str, animation_object: Rc<dyn AsCompositionObject>, )
Sets an object as a reference parameter of an expression: the
expression reads its properties (key.Offset) every time it is
evaluated, as with set_reference_parameter.
pub fn set_matrix3x2_parameter(&self, key: &str, value: Matrix3x2)
pub fn set_matrix4x4_parameter(&self, key: &str, value: Matrix4x4)
pub fn set_quaternion_parameter(&self, key: &str, value: Quaternion)
pub fn set_reference_parameter( &self, key: &str, composition_object: Rc<dyn AsCompositionObject>, )
pub fn set_scalar_parameter(&self, key: &str, value: f32)
pub fn set_vector2_parameter(&self, key: &str, value: Vector2)
pub fn set_vector3_parameter(&self, key: &str, value: Vector3)
pub fn set_vector4_parameter(&self, key: &str, value: Vector4)
pub fn set_target(&self, value: Option<String>)
Sourcepub fn initial_value_expressions(&self) -> &InitialValueExpressionCollection
pub fn initial_value_expressions(&self) -> &InitialValueExpressionCollection
The initial values of the animation: for a property of the target object, the expression that gives the property its value when the animation starts.
Trait Implementations§
Source§impl AsCompositionObject for SpringVector3NaturalMotionAnimation
impl AsCompositionObject for SpringVector3NaturalMotionAnimation
Source§fn as_composition_object(&self) -> &CompositionObject
fn as_composition_object(&self) -> &CompositionObject
CompositionObject.Source§fn composition_type_name(&self) -> &'static str
fn composition_type_name(&self) -> &'static str
Source§fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
is CompositionPropertySet test of upstream).Source§impl Deref for SpringVector3NaturalMotionAnimation
impl Deref for SpringVector3NaturalMotionAnimation
Source§type Target = Vector3NaturalMotionAnimation
type Target = Vector3NaturalMotionAnimation
Source§fn deref(&self) -> &Vector3NaturalMotionAnimation
fn deref(&self) -> &Vector3NaturalMotionAnimation
Source§impl ICompositionAnimation for SpringVector3NaturalMotionAnimation
impl ICompositionAnimation for SpringVector3NaturalMotionAnimation
Source§fn create_instance(
&self,
target_object: ServerObjectId,
implicit_final_value: Option<ExpressionVariant>,
) -> AnimationInstanceFactory
fn create_instance( &self, target_object: ServerObjectId, implicit_final_value: Option<ExpressionVariant>, ) -> AnimationInstanceFactory
target_object, as the factory that is sent to the server. final_value is the value the property was just
set to when the animation is implicit.Source§fn composition_animation(&self) -> Option<&CompositionAnimation>
fn composition_animation(&self) -> Option<&CompositionAnimation>
CompositionAnimation part of the animation, through which its parameters are set
(SetScalarParameter, …); None for an animation without one.Source§impl ICompositionAnimationBase for SpringVector3NaturalMotionAnimation
impl ICompositionAnimationBase for SpringVector3NaturalMotionAnimation
Source§fn as_composition_animation(&self) -> Option<&dyn ICompositionAnimation>
fn as_composition_animation(&self) -> Option<&dyn ICompositionAnimation>
Source§fn as_composition_animation_group(&self) -> Option<&CompositionAnimationGroup>
fn as_composition_animation_group(&self) -> Option<&CompositionAnimationGroup>
Auto Trait Implementations§
impl !Freeze for SpringVector3NaturalMotionAnimation
impl !RefUnwindSafe for SpringVector3NaturalMotionAnimation
impl !Send for SpringVector3NaturalMotionAnimation
impl !Sync for SpringVector3NaturalMotionAnimation
impl !UnwindSafe for SpringVector3NaturalMotionAnimation
impl Unpin for SpringVector3NaturalMotionAnimation
impl UnsafeUnpin for SpringVector3NaturalMotionAnimation
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