pub struct GalileanMorphism {
pub translation: Vec<f64>,
pub rotation: [[f64; 3]; 3],
pub velocity: Vec<f64>,
}Expand description
A Galilean frame morphism — translation + rotation + velocity (W5).
Fields§
§translation: Vec<f64>Translation: offset of the target frame’s origin in the source frame’s coordinates.
rotation: [[f64; 3]; 3]Rotation as a 3x3 matrix (row-major). Identity = no rotation.
velocity: Vec<f64>Velocity of the target frame relative to the source (m/s). For stationary frames, this is [0, 0, 0].
Implementations§
Source§impl GalileanMorphism
impl GalileanMorphism
Sourcepub fn translation(tx: f64, ty: f64, tz: f64) -> Self
pub fn translation(tx: f64, ty: f64, tz: f64) -> Self
Create a pure translation morphism.
Sourcepub fn velocity(vx: f64, vy: f64, vz: f64) -> Self
pub fn velocity(vx: f64, vy: f64, vz: f64) -> Self
Create a pure velocity morphism (moving frame, no rotation).
Sourcepub fn transform_position(&self, pos: &[f64], t: f64) -> Vec<f64>
pub fn transform_position(&self, pos: &[f64], t: f64) -> Vec<f64>
Transform a position from source frame to target frame. p_target = R^T * (p_source - translation - velocity * t)
Sourcepub fn transform_pose(&self, pose: &Pose, t: f64) -> Pose
pub fn transform_pose(&self, pose: &Pose, t: f64) -> Pose
Transform a pose from source frame to target frame. Time is absolute in Galilean relativity (t_target = t_source).
Trait Implementations§
Source§impl Clone for GalileanMorphism
impl Clone for GalileanMorphism
Source§impl Debug for GalileanMorphism
impl Debug for GalileanMorphism
Source§impl PartialEq for GalileanMorphism
impl PartialEq for GalileanMorphism
impl StructuralPartialEq for GalileanMorphism
Auto Trait Implementations§
impl Freeze for GalileanMorphism
impl RefUnwindSafe for GalileanMorphism
impl Send for GalileanMorphism
impl Sync for GalileanMorphism
impl Unpin for GalileanMorphism
impl UnsafeUnpin for GalileanMorphism
impl UnwindSafe for GalileanMorphism
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