pub struct Space { /* private fields */ }Expand description
How a world position becomes a distance: one place for the world unit to ear unit shift, the pan law and the cull threshold.
§Example
use psx_sfx::space::{PanLaw, Space};
// World units are 1/8 of the unit the curve is written in, and sounds
// under 100 are not worth a voice.
let space = Space::new(3, PanLaw::Off).with_cull(100);
assert_eq!(space.cull(), 100);Implementations§
Source§impl Space
impl Space
Sourcepub const fn new(shift: u8, law: PanLaw) -> Self
pub const fn new(shift: u8, law: PanLaw) -> Self
Distances are (emitter - listener) >> shift per axis.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Space
impl RefUnwindSafe for Space
impl Send for Space
impl Sync for Space
impl Unpin for Space
impl UnsafeUnpin for Space
impl UnwindSafe for Space
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)