use std::ptr::NonNull;
use fmod_sys::*;
mod general;
mod polygons;
mod spatialization;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(transparent)] pub struct Geometry {
pub(crate) inner: NonNull<FMOD_GEOMETRY>,
}
#[cfg(not(feature = "thread-unsafe"))]
unsafe impl Send for Geometry {}
#[cfg(not(feature = "thread-unsafe"))]
unsafe impl Sync for Geometry {}
impl Geometry {
pub unsafe fn from_ffi(value: *mut FMOD_GEOMETRY) -> Self {
let inner = NonNull::new(value).unwrap();
Geometry { inner }
}
pub fn as_ptr(self) -> *mut FMOD_GEOMETRY {
self.inner.as_ptr()
}
}
impl From<Geometry> for *mut FMOD_GEOMETRY {
fn from(value: Geometry) -> Self {
value.inner.as_ptr()
}
}