audionimbus 0.14.0

A safe wrapper around Steam Audio that provides spatial audio capabilities with realistic occlusion, reverb, and HRTF effects, accounting for physical attributes and scene geometry.
Documentation
use super::Point;

/// A sphere.
/// Spheres are used to define a region of influence around a point.
#[derive(Copy, Clone, Debug, Default, PartialEq)]
pub struct Sphere {
    /// The center.
    pub center: Point,

    /// The radius.
    pub radius: f32,
}

impl From<Sphere> for audionimbus_sys::IPLSphere {
    fn from(sphere: Sphere) -> Self {
        Self {
            center: sphere.center.into(),
            radius: sphere.radius,
        }
    }
}

impl From<audionimbus_sys::IPLSphere> for Sphere {
    fn from(ipl_sphere: audionimbus_sys::IPLSphere) -> Self {
        Self {
            center: ipl_sphere.center.into(),
            radius: ipl_sphere.radius,
        }
    }
}