Trait Directivity

Source
pub trait Directivity: Send + Sync {
    // Required method
    fn directivity(theta: Angle) -> f32;

    // Provided method
    fn directivity_from_dir(
        axial_direction: &UnitVector3,
        target: &Vector3,
    ) -> f32 { ... }
}
Available on crate feature acoustics only.
Expand description

A trait representing the directivity of ultrasound transducer.

Required Methods§

Source

fn directivity(theta: Angle) -> f32

Calculates the directivity based on the given angle.

§Arguments
  • theta - The angle between the axial direction and the target direction.

Provided Methods§

Source

fn directivity_from_dir(axial_direction: &UnitVector3, target: &Vector3) -> f32

Calculates the directivity based on the axial direction and target direction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§