IPLMaterial

Struct IPLMaterial 

Source
#[repr(C)]
pub struct IPLMaterial { pub absorption: [IPLfloat32; 3], pub scattering: IPLfloat32, pub transmission: [IPLfloat32; 3], }
Expand description

The acoustic properties of a surface.

You can specify the acoustic material properties of each triangle, although typically many triangles will share a common material.

The acoustic material properties are specified for three frequency bands with center frequencies of 400 Hz, 2.5 KHz, and 15 KHz.

Below are the acoustic material properties for a few standard materials.

{"generic",{0.10f,0.20f,0.30f,0.05f,0.100f,0.050f,0.030f}}
{"brick",{0.03f,0.04f,0.07f,0.05f,0.015f,0.015f,0.015f}}
{"concrete",{0.05f,0.07f,0.08f,0.05f,0.015f,0.002f,0.001f}}
{"ceramic",{0.01f,0.02f,0.02f,0.05f,0.060f,0.044f,0.011f}}
{"gravel",{0.60f,0.70f,0.80f,0.05f,0.031f,0.012f,0.008f}},
{"carpet",{0.24f,0.69f,0.73f,0.05f,0.020f,0.005f,0.003f}}
{"glass",{0.06f,0.03f,0.02f,0.05f,0.060f,0.044f,0.011f}}
{"plaster",{0.12f,0.06f,0.04f,0.05f,0.056f,0.056f,0.004f}}
{"wood",{0.11f,0.07f,0.06f,0.05f,0.070f,0.014f,0.005f}}
{"metal",{0.20f,0.07f,0.06f,0.05f,0.200f,0.025f,0.010f}}
{"rock",{0.13f,0.20f,0.24f,0.05f,0.015f,0.002f,0.001f}}

Fields§

§absorption: [IPLfloat32; 3]

Fraction of sound energy absorbed at low, middle, high frequencies. Between 0.0 and 1.0.

§scattering: IPLfloat32

Fraction of sound energy scattered in a random direction on reflection. Between 0.0 (pure specular) and 1.0 (pure diffuse).

§transmission: [IPLfloat32; 3]

Fraction of sound energy transmitted through at low, middle, high frequencies. Between 0.0 and 1.0. Only used for direct occlusion calculations.

Trait Implementations§

Source§

impl Clone for IPLMaterial

Source§

fn clone(&self) -> IPLMaterial

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IPLMaterial

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for IPLMaterial

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.