Struct rich_sdl2_rust::haptic::effect::Envelope
source · pub struct Envelope {
pub attack_length: u16,
pub attack_level: u16,
pub fade_length: u16,
pub fade_level: u16,
}
Expand description
An envelope to fade in/out the effect. If both attack_length
and fade_level
are 0
, the envelope is not used. An example of a constant effect evolution in time:
Strength
^
|
| effect level --> _________________
| / \
| / \
| / \
| / \
| attack_level --> | \
| | | <--- fade_level
|
+--------------------------------------------------> Time
[--] [---]
attack_length fade_length
[------------------][-----------------------]
delay length
Fields§
§attack_length: u16
The length of the level from attack_level
to the effect level in milliseconds.
attack_level: u16
The initial force level on applying.
fade_length: u16
The length of the level from the effect level to attack_level
in milliseconds.
fade_level: u16
The end force level on applying.
Trait Implementations§
source§impl PartialEq for Envelope
impl PartialEq for Envelope
impl Eq for Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnwindSafe for Envelope
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