pub struct RigidTransform {
pub rotation: Rotation3,
pub translation: [f64; 3],
}Expand description
x ↦ R x + t. Positions are rotated and translated; field vectors (directions, polarizations)
are only rotated. Complex vectors are rotated component-wise in their real and imaginary parts.
Fields§
§rotation: Rotation3§translation: [f64; 3]Implementations§
Source§impl RigidTransform
impl RigidTransform
pub fn identity() -> Self
pub fn translation(t: [f64; 3]) -> Self
pub fn rotation(r: Rotation3) -> Self
Sourcepub fn rotation_about(axis: [f64; 3], angle: f64) -> Self
pub fn rotation_about(axis: [f64; 3], angle: f64) -> Self
Rotation about axis by angle radians (through the origin).
Sourcepub fn apply_point(&self, p: [f64; 3]) -> [f64; 3]
pub fn apply_point(&self, p: [f64; 3]) -> [f64; 3]
Applies the transform to a point given in Cartesian coordinates.
Sourcepub fn apply_position(&self, p: &Position) -> Position
pub fn apply_position(&self, p: &Position) -> Position
Applies the transform to a Position, returning it in the same coordinate system.
Sourcepub fn apply_vector(&self, v: [f64; 3]) -> [f64; 3]
pub fn apply_vector(&self, v: [f64; 3]) -> [f64; 3]
Rotates a real vector given in Cartesian components (translation does not apply).
Sourcepub fn apply_complex_vector(&self, v: [C64; 3]) -> [C64; 3]
pub fn apply_complex_vector(&self, v: [C64; 3]) -> [C64; 3]
Rotates a complex vector given in Cartesian components.
Sourcepub fn then_after(&self, other: &RigidTransform) -> RigidTransform
pub fn then_after(&self, other: &RigidTransform) -> RigidTransform
self ∘ other: apply other first, then self.
Sourcepub fn inverse(&self) -> RigidTransform
pub fn inverse(&self) -> RigidTransform
The inverse transform.
Trait Implementations§
Source§impl Clone for RigidTransform
impl Clone for RigidTransform
impl Copy for RigidTransform
Source§impl Debug for RigidTransform
impl Debug for RigidTransform
Source§impl Default for RigidTransform
impl Default for RigidTransform
Source§impl PartialEq for RigidTransform
impl PartialEq for RigidTransform
impl StructuralPartialEq for RigidTransform
Auto Trait Implementations§
impl Freeze for RigidTransform
impl RefUnwindSafe for RigidTransform
impl Send for RigidTransform
impl Sync for RigidTransform
impl Unpin for RigidTransform
impl UnsafeUnpin for RigidTransform
impl UnwindSafe for RigidTransform
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