Struct SpatialListener
pub struct SpatialListener {
pub position: [f32; 3],
pub velocity: [f32; 3],
pub forward: [f32; 3],
pub up: [f32; 3],
}Expand description
3D Spatial Listener (camera or avatar ears).
Fields§
§position: [f32; 3]3D position [x, y, z] in meters.
velocity: [f32; 3]3D velocity [vx, vy, vz] in m/s (drives Doppler effect).
forward: [f32; 3]Unit forward look vector [fx, fy, fz].
up: [f32; 3]Unit up vector [ux, uy, uz].
Implementations§
§impl SpatialListener
impl SpatialListener
pub fn from_pga_motor_blades(
r: [f32; 4],
d: [f32; 4],
velocity: [f32; 3],
) -> SpatialListener
pub fn from_pga_motor_blades( r: [f32; 4], d: [f32; 4], velocity: [f32; 3], ) -> SpatialListener
Extracts a SpatialListener pose directly from 8-component PGA Motor blades (r, d)
(r = [s, e12, e13, e23], d = [e0123, e03, e02, e01]) and linear velocity.
Trait Implementations§
§impl Clone for SpatialListener
impl Clone for SpatialListener
§fn clone(&self) -> SpatialListener
fn clone(&self) -> SpatialListener
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpatialListener
§impl Debug for SpatialListener
impl Debug for SpatialListener
§impl Default for SpatialListener
impl Default for SpatialListener
§fn default() -> SpatialListener
fn default() -> SpatialListener
Returns the “default value” for a type. Read more
§impl PartialEq for SpatialListener
impl PartialEq for SpatialListener
impl StructuralPartialEq for SpatialListener
Auto Trait Implementations§
impl Freeze for SpatialListener
impl RefUnwindSafe for SpatialListener
impl Send for SpatialListener
impl Sync for SpatialListener
impl Unpin for SpatialListener
impl UnsafeUnpin for SpatialListener
impl UnwindSafe for SpatialListener
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