pub struct DirectionList { /* private fields */ }Expand description
Wavelength-independent incident propagation directions in sample coordinates.
Unit vectors are the canonical stored and serialized form. Directions must
have non-negative z; the on-axis direction is (0, 0, 1).
Implementations§
Source§impl DirectionList
impl DirectionList
Sourcepub fn from_unit_vectors(unit_vectors: Vec<[f64; 3]>) -> Result<Self>
pub fn from_unit_vectors(unit_vectors: Vec<[f64; 3]>) -> Result<Self>
Validates and stores already normalized propagation directions.
Sourcepub fn from_vectors(vectors: Vec<[f64; 3]>, normalize: bool) -> Result<Self>
pub fn from_vectors(vectors: Vec<[f64; 3]>, normalize: bool) -> Result<Self>
Stores propagation vectors, optionally normalizing each input vector.
Sourcepub fn from_direction_cosines(values: Vec<[f64; 2]>) -> Result<Self>
pub fn from_direction_cosines(values: Vec<[f64; 2]>) -> Result<Self>
Constructs directions from transverse direction cosines (dx, dy).
Sourcepub fn from_component_angles_radians(values: Vec<[f64; 2]>) -> Result<Self>
pub fn from_component_angles_radians(values: Vec<[f64; 2]>) -> Result<Self>
Constructs directions from independent component angles (theta_x, theta_y) in radians.
Sourcepub fn from_component_angles_degrees(values: Vec<[f64; 2]>) -> Result<Self>
pub fn from_component_angles_degrees(values: Vec<[f64; 2]>) -> Result<Self>
Constructs directions from independent component angles in degrees.
Sourcepub fn from_polar_angles_radians(values: Vec<[f64; 2]>) -> Result<Self>
pub fn from_polar_angles_radians(values: Vec<[f64; 2]>) -> Result<Self>
Constructs directions from polar angle theta and azimuth phi, in radians.
Sourcepub fn from_polar_angles_degrees(values: Vec<[f64; 2]>) -> Result<Self>
pub fn from_polar_angles_degrees(values: Vec<[f64; 2]>) -> Result<Self>
Constructs directions from polar angle theta and azimuth phi, in degrees.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Returns the number of directions.
Sourcepub fn unit_vectors(&self) -> &[[f64; 3]]
pub fn unit_vectors(&self) -> &[[f64; 3]]
Borrows the canonical propagation unit vectors.
Sourcepub fn direction_cosines(&self) -> Vec<[f64; 2]>
pub fn direction_cosines(&self) -> Vec<[f64; 2]>
Allocates transverse direction cosines (dx, dy).
Sourcepub fn component_angles_rad(&self) -> Vec<[f64; 2]>
pub fn component_angles_rad(&self) -> Vec<[f64; 2]>
Allocates independent component angles (asin(dx), asin(dy)) in radians.
Sourcepub fn component_angles_deg(&self) -> Vec<[f64; 2]>
pub fn component_angles_deg(&self) -> Vec<[f64; 2]>
Allocates independent component angles in degrees.
Sourcepub fn polar_angles_rad(&self) -> Vec<[f64; 2]>
pub fn polar_angles_rad(&self) -> Vec<[f64; 2]>
Allocates polar (theta, phi) angles in radians.
Sourcepub fn polar_angles_deg(&self) -> Vec<[f64; 2]>
pub fn polar_angles_deg(&self) -> Vec<[f64; 2]>
Allocates polar (theta, phi) angles in degrees.
Sourcepub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
pub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
Resolves directions with the illumination wavenumber from optics.
Trait Implementations§
Source§impl Clone for DirectionList
impl Clone for DirectionList
Source§fn clone(&self) -> DirectionList
fn clone(&self) -> DirectionList
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectionList
impl Debug for DirectionList
Source§impl<'de> Deserialize<'de> for DirectionList
impl<'de> Deserialize<'de> for DirectionList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<DirectionList> for SourceGeometry
impl From<DirectionList> for SourceGeometry
Source§fn from(value: DirectionList) -> Self
fn from(value: DirectionList) -> Self
Source§impl PartialEq for DirectionList
impl PartialEq for DirectionList
Source§fn eq(&self, other: &DirectionList) -> bool
fn eq(&self, other: &DirectionList) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DirectionList
impl Serialize for DirectionList
impl StructuralPartialEq for DirectionList
Auto Trait Implementations§
impl Freeze for DirectionList
impl RefUnwindSafe for DirectionList
impl Send for DirectionList
impl Sync for DirectionList
impl Unpin for DirectionList
impl UnsafeUnpin for DirectionList
impl UnwindSafe for DirectionList
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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