Struct comfy_wgpu::kira::spatial::scene::SpatialSceneHandle
pub struct SpatialSceneHandle { /* private fields */ }Expand description
Controls a spatial scene.
When a SpatialSceneHandle is dropped, the corresponding
spatial scene will be removed.
Implementations§
§impl SpatialSceneHandle
impl SpatialSceneHandle
pub fn id(&self) -> SpatialSceneId
pub fn id(&self) -> SpatialSceneId
Returns the unique identifier for the spatial scene.
pub 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.
pub 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.
pub fn num_emitters(&self) -> usize
pub fn num_emitters(&self) -> usize
Returns the number of emitters in the scene.
pub fn num_listeners(&self) -> usize
pub fn num_listeners(&self) -> usize
Returns the number of listeners in the scene.
Trait Implementations§
§impl Drop for SpatialSceneHandle
impl Drop for SpatialSceneHandle
§impl From<&SpatialSceneHandle> for SpatialSceneId
impl From<&SpatialSceneHandle> for SpatialSceneId
§fn from(handle: &SpatialSceneHandle) -> SpatialSceneId
fn from(handle: &SpatialSceneHandle) -> SpatialSceneId
Converts to this type from the input type.
Auto Trait Implementations§
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