pub struct Transform {
pub from: Placement,
pub to: Placement,
}Expand description
An item-defined transformation as two frames: the relative transform maps
from (transform_item_1) to to (transform_item_2) — the faithful
two-frame form; Transform::matrix composes them on demand.
Fields§
§from: Placement§to: PlacementImplementations§
Source§impl Transform
impl Transform
Sourcepub fn matrix(&self) -> Option<[[f64; 4]; 4]>
pub fn matrix(&self) -> Option<[[f64; 4]; 4]>
The relative placement composed into one homogeneous 4×4 matrix — an
opt-in derived view of the two stored frames (M = F_to · F_from⁻¹:
geometry defined in the from frame lands in the to frame).
Convention: m[row][col], points map as column vectors p' = M · p,
and the last row is [0, 0, 0, 1] (STEP placements carry rotation and
translation only). None if either placement is degenerate (a zero
axis, or a reference direction parallel to the axis) — the matrix is
not fabricated from bad frames.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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