Struct hrtf::HrirSphere[][src]

pub struct HrirSphere { /* fields omitted */ }
Expand description

HRIR (Head-Related Impulse Response) spheres is a 3d mesh whose points contains impulse responses for left and right ears. It is used for interpolation of impulse responses.

Implementations

Tries to load a sphere from a file.

Loads HRIR sphere from given source.

Coordinate system

Hrtf spheres made in right-handed coordinate system. This fact can give weird positioning issues if your application uses left-handed coordinate system. However this can be fixed very easily: iterate over every point and invert X coordinate of it.

Sample rate

HRIR spheres from this base recorded in 44100 Hz sample rate. If your output device uses different sample rate, you have to resample initial set of .wav files and regenerate HRIR spheres. There could

Applies specified transform to each point in sphere. Can be used to rotate or scale sphere. Transform shouldn’t have translation part, otherwise result of bilinear sampling is undefined.

Returns shared reference to sphere points array.

Returns mutable reference to sphere points array.

Returns length of impulse response. It is same across all points in the sphere.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.