pub struct SpatialSceneHandle { /* private fields */ }Expand description
Controls a spatial scene.
When a SpatialSceneHandle is dropped, the corresponding
spatial scene will be removed.
Implementations§
Source§impl SpatialSceneHandle
impl SpatialSceneHandle
Sourcepub fn id(&self) -> SpatialSceneId
pub fn id(&self) -> SpatialSceneId
Returns the unique identifier for the spatial scene.
Sourcepub fn add_emitter(
&mut self,
position: impl Into<Value<Vector3<f32>>>,
settings: EmitterSettings,
) -> Result<EmitterHandle, AddEmitterError>
pub fn add_emitter( &mut self, position: impl Into<Value<Vector3<f32>>>, settings: EmitterSettings, ) -> Result<EmitterHandle, AddEmitterError>
Adds an emitter to the scene.
Sourcepub fn add_listener(
&mut self,
position: impl Into<Value<Vector3<f32>>>,
orientation: impl Into<Value<Quaternion<f32>>>,
settings: ListenerSettings,
) -> Result<ListenerHandle, AddListenerError>
pub fn add_listener( &mut self, position: impl Into<Value<Vector3<f32>>>, orientation: impl Into<Value<Quaternion<f32>>>, settings: ListenerSettings, ) -> Result<ListenerHandle, AddListenerError>
Adds a listener to the scene.
An unrotated listener should face in the negative Z direction with positive X to the right and positive Y up.
Sourcepub fn num_emitters(&self) -> usize
pub fn num_emitters(&self) -> usize
Returns the number of emitters in the scene.
Sourcepub fn num_listeners(&self) -> usize
pub fn num_listeners(&self) -> usize
Returns the number of listeners in the scene.
Trait Implementations§
Source§impl Drop for SpatialSceneHandle
impl Drop for SpatialSceneHandle
Source§impl From<&SpatialSceneHandle> for SpatialSceneId
impl From<&SpatialSceneHandle> for SpatialSceneId
Source§fn from(handle: &SpatialSceneHandle) -> SpatialSceneId
fn from(handle: &SpatialSceneHandle) -> SpatialSceneId
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SpatialSceneHandle
impl RefUnwindSafe for SpatialSceneHandle
impl Send for SpatialSceneHandle
impl Sync for SpatialSceneHandle
impl Unpin for SpatialSceneHandle
impl UnwindSafe for SpatialSceneHandle
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more