PluckerTransform

Struct PluckerTransform 

Source
pub struct PluckerTransform {
    pub rotation: PlukerRotation,
    pub translation: Vec3,
}
Expand description

A spatial transform using Plücker coordinates.

Fields§

§rotation: PlukerRotation

The rotation component of the spatial transform (E).

This is a 3×3 rotation matrix that transforms angular components from the parent/reference frame to the child/local frame.

§translation: Vec3

The translation component of the spatial transform (r).

This is a 3D vector representing the position of the child frame origin relative to the parent frame origin, expressed in parent frame coordinates.

Implementations§

Source§

impl PluckerTransform

Source

pub fn identity() -> Self

Create an identity PluckerTransform.

Returns a transform with no rotation or translation.

Source

pub fn from_pose(pose: Pose) -> Self

Create a plucker transform from a pose. The returned transform converts from parent to local.

Source

pub fn any_nan(&self) -> bool

Check if the transform contains any NaN values.

Source

pub fn mul_transform(&self, rhs: &PluckerTransform) -> PluckerTransform

Multiply this transform by another transform.

Computes the composition of two transforms: result = self * rhs where rhs is applied first, then self.

The formula is: X1 * X2 = plx(E1E2, r2 + E2^T r1)

Source

pub fn inverse(&self) -> PluckerTransform

Compute the inverse of the transform.

Returns a transform that undoes this transform when applied.

The formula is: X^-1 = plx(E^T, -Er)

Source

pub fn transform_motion_vec( &self, v: SpatialMotionVector, ) -> SpatialMotionVector

Transform a spatial motion vector from parent frame to child frame.

Transforms a 6D motion vector containing angular and linear velocity components. The formula is: X * v^ = mv(Ew, E(v - r x w))

§Arguments
  • v - Spatial motion vector in parent frame coordinates
§Returns

Spatial motion vector in child frame coordinates

Source

pub fn inverse_transform_motion_vec( &self, v: SpatialMotionVector, ) -> SpatialMotionVector

Transform a spatial motion vector from child frame to parent frame.

This is the inverse operation of transform_motion_vec. The formula is: X^-1 * v^ = mv(E^T w, E^T v + r x E^T w)

§Arguments
  • v - Spatial motion vector in child frame coordinates
§Returns

Spatial motion vector in parent frame coordinates

Source

pub fn transform_force_vec(&self, f: SpatialForceVector) -> SpatialForceVector

Transform a spatial force vector from parent frame to child frame.

Transforms a 6D force vector containing moment (torque) and force components. The formula is: X * f = fv(E(n - r x f), Ef)

§Arguments
  • f - Spatial force vector in parent frame coordinates
§Returns

Spatial force vector in child frame coordinates

Source

pub fn inverse_transform_force_vec( &self, f: SpatialForceVector, ) -> SpatialForceVector

Transform a spatial force vector from child frame to parent frame.

This is the inverse operation of transform_force_vec. The formula is: X^-1 * f = fv(E^T n + r x E^T f, E^T f)

§Arguments
  • f - Spatial force vector in child frame coordinates
§Returns

Spatial force vector in parent frame coordinates

Source

pub fn transform_point(&self, point: Vec3) -> Vec3

Transform a point from reference frame to local

Source

pub fn transform_vec3(&self, vec3: Vec3) -> Vec3

Transform a 3D vector from reference frame to local frame.

Applies only the rotation component of the transform, ignoring translation. This is appropriate for transforming directions and vectors that represent

Source

pub fn inverse_transform_point(&self, point: Vec3) -> Vec3

Transform a point from local frame to reference frame

Source

pub fn inverse_transform_vec3(&self, vec3: Vec3) -> Vec3

Transform a 3D vector from local frame to reference frame.

Applies only the inverse rotation component of the transform, ignoring translation. This is the inverse operation of transform_vec3.

Source

pub fn inverse_transform_unitvec3(&self, vec3: UnitVec3) -> UnitVec3

Transform a unit vector from local frame to reference frame.

Applies only the inverse rotation component of the transform, ignoring translation. The input vector is assumed to be normalized and will remain normalized.

Source

pub fn transform_articulated_inertia( &self, inertia: &ArticulatedBodyInertia, ) -> ArticulatedBodyInertia

Transform an articulated body inertia from parent frame to child frame.

Transforms a 6×6 articulated body inertia matrix using the similarity transform: I_child = X * I_parent * Xᵀ

The formula involves three components:

  • Mass matrix: M = E * M * Eᵀ
  • Coriolis matrix: H = E * (H - r * M) * Eᵀ
  • Rotational inertia: I = E * (I - r×Hᵀ + (H - r×M)r×) * Eᵀ
§Arguments
  • inertia - Articulated body inertia in parent frame coordinates
§Returns

Articulated body inertia in child frame coordinates

Source

pub fn matrix(&self) -> SMatrix<6, 6>

Convert the Plücker transform to a 6×6 matrix representation.

Returns the full 6×6 spatial transform matrix:

    | E   0 |
X = |       |
    | -E×r E |

where E is the 3×3 rotation matrix and r is the translation vector. This matrix can be used for direct multiplication with 6D vectors.

Source

pub fn dual_matrix(&self) -> SMatrix<6, 6>

Convert the Plücker transform to its dual matrix representation.

Returns the dual transform matrix where the translation component appears in the top-right block instead of the bottom-left block:

    | E  -E×r |
X* = |        |
    | 0    E  |

The dual matrix is the transpose inverse of the regular matrix. This representation is useful for transforming certain spatial quantities.

Source

pub fn is_near_identity(&self, epsilon: Real) -> bool

Check whether the transform is close to identity. Check whether the transform is close to identity.

Returns true if both the rotation angle and translation magnitude are below the given epsilon threshold.

§Arguments
  • epsilon - Maximum allowed deviation from identity
§Returns

True if the transform is approximately identity

Source§

impl PluckerTransform

Source

pub fn pose(&self) -> Pose

Convert the Plücker transform to a pose.

Returns a pose that represents the same transformation but with the rotation component inverted to match pose conventions. This is because poses typically represent the transformation from local to world space, while Plücker transforms represent the transformation from parent to child frame.

Trait Implementations§

Source§

impl Clone for PluckerTransform

Source§

fn clone(&self) -> PluckerTransform

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PluckerTransform

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PluckerTransform

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<Pose> for PluckerTransform

Source§

fn from(pose: Pose) -> Self

Converts to this type from the input type.
Source§

impl Mul<&ArticulatedBodyInertia> for PluckerTransform

Source§

type Output = ArticulatedBodyInertia

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &ArticulatedBodyInertia) -> ArticulatedBodyInertia

Performs the * operation. Read more
Source§

impl Mul<SpatialVector<Force>> for PluckerTransform

Source§

type Output = SpatialVector<Force>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SpatialForceVector) -> SpatialForceVector

Performs the * operation. Read more
Source§

impl Mul<SpatialVector<Motion>> for PluckerTransform

Source§

type Output = SpatialVector<Motion>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SpatialMotionVector) -> SpatialMotionVector

Performs the * operation. Read more
Source§

impl Mul for PluckerTransform

Source§

type Output = PluckerTransform

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl PartialEq for PluckerTransform

Source§

fn eq(&self, other: &PluckerTransform) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for PluckerTransform

Source§

impl StructuralPartialEq for PluckerTransform

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,