[][src]Enum gilrs::ff::DistanceModel

pub enum DistanceModel {
    None,
    Linear {
        ref_distance: f32,
        rolloff_factor: f32,
        max_distance: f32,
    },
    LinearClamped {
        ref_distance: f32,
        rolloff_factor: f32,
        max_distance: f32,
    },
    Inverse {
        ref_distance: f32,
        rolloff_factor: f32,
    },
    InverseClamped {
        ref_distance: f32,
        rolloff_factor: f32,
        max_distance: f32,
    },
    Exponential {
        ref_distance: f32,
        rolloff_factor: f32,
    },
    ExponentialClamped {
        ref_distance: f32,
        rolloff_factor: f32,
        max_distance: f32,
    },
}

Specifies how distance between effect source and listener attenuates effect.

They are based on OpenAL Specification (chapter 3.4), but the best way to see how they differ is to run ff_pos example.

Make sure that all parameters are ≥ 0. Additionally Linear and LinearClamped models don't like if ref_distance == max_distance while others would prefer ref_distance > 0.

Variants

None

Effect is not attenuated by distance.

Linear

Linear distance model.

Fields of Linear

ref_distance: f32rolloff_factor: f32max_distance: f32
LinearClamped

Linear distance clamped model.

Fields of LinearClamped

ref_distance: f32rolloff_factor: f32max_distance: f32
Inverse

Inverse distance model.

Fields of Inverse

ref_distance: f32rolloff_factor: f32
InverseClamped

Inverse distance clamped model.

Fields of InverseClamped

ref_distance: f32rolloff_factor: f32max_distance: f32
Exponential

Exponential distance model.

Fields of Exponential

ref_distance: f32rolloff_factor: f32
ExponentialClamped

Exponential distance clamped model.

Fields of ExponentialClamped

ref_distance: f32rolloff_factor: f32max_distance: f32

Trait Implementations

impl Default for DistanceModel
[src]

impl Clone for DistanceModel
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for DistanceModel
[src]

impl PartialEq<DistanceModel> for DistanceModel
[src]

impl Debug for DistanceModel
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]