pub struct PlukerRotation(/* private fields */);Expand description
A Plücker rotation representing a 3D rotation from reference to local frame.
Implementations§
Source§impl PlukerRotation
impl PlukerRotation
Sourcepub fn from_axis_angle(axis: UnitVec3, angle: Real) -> Self
pub fn from_axis_angle(axis: UnitVec3, angle: Real) -> Self
Create a Plücker rotation from an axis and angle that rotates from reference to local frame.
§Coordinate Frame Convention
This creates a rotation that transforms vectors from the parent/reference frame to the child/local frame, following Featherstone’s spatial algebra conventions.
Sourcepub fn from_quat(quat: UnitQuat) -> Self
pub fn from_quat(quat: UnitQuat) -> Self
Create a Plücker rotation from a unit quaternion.
The quaternion should represent the rotation from reference to local frame to be consistent with spatial algebra conventions.
Sourcepub fn into_matrix(self) -> Mat3
pub fn into_matrix(self) -> Mat3
Convert the Plücker rotation to a 3x3 matrix.
Sourcepub fn identity() -> Self
pub fn identity() -> Self
Create a identity PlukerRotation.
Sourcepub fn transpose(&self) -> Self
pub fn transpose(&self) -> Self
Transpose of the rotation is identical to the inverse.
Returns the transpose of the rotation matrix, which is equivalent to the inverse for orthogonal rotation matrices.
Sourcepub fn matrix(&self) -> Mat3
pub fn matrix(&self) -> Mat3
Convert the rotation to a 3x3 matrix.
Returns the underlying rotation matrix representation.
Sourcepub fn inverse_transform_vector(&self, v: Vec3) -> Vec3
pub fn inverse_transform_vector(&self, v: Vec3) -> Vec3
Transform a vector from local frame to reference frame.
This is the inverse operation of multiplying a vector by the rotation.
Sourcepub fn inverse_transform_unitvec(&self, v: UnitVec3) -> UnitVec3
pub fn inverse_transform_unitvec(&self, v: UnitVec3) -> UnitVec3
Transform a unit vector from local frame to reference frame.
This is the inverse operation of multiplying a unit vector by the rotation.
Sourcepub fn axis_angle(&self) -> Option<(UnitVec3, Real)>
pub fn axis_angle(&self) -> Option<(UnitVec3, Real)>
Get the axis and angle of the rotation.
Sourcepub fn from_matrix_unchecked(matrix: Mat3) -> Self
pub fn from_matrix_unchecked(matrix: Mat3) -> Self
Create a Plücker rotation from a 3x3 matrix without validation.
§Safety
The input matrix must be a valid rotation matrix (orthogonal with determinant 1). This function does not perform validation, so invalid input may cause undefined behavior.
Trait Implementations§
Source§impl Clone for PlukerRotation
impl Clone for PlukerRotation
Source§fn clone(&self) -> PlukerRotation
fn clone(&self) -> PlukerRotation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlukerRotation
impl Debug for PlukerRotation
Source§impl Mul<Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>> for PlukerRotation
impl Mul<Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>> for PlukerRotation
Source§impl Mul<Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>> for PlukerRotation
impl Mul<Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>> for PlukerRotation
Source§impl Mul for PlukerRotation
impl Mul for PlukerRotation
Source§impl PartialEq for PlukerRotation
impl PartialEq for PlukerRotation
impl Copy for PlukerRotation
impl StructuralPartialEq for PlukerRotation
Auto Trait Implementations§
impl Freeze for PlukerRotation
impl RefUnwindSafe for PlukerRotation
impl Send for PlukerRotation
impl Sync for PlukerRotation
impl Unpin for PlukerRotation
impl UnwindSafe for PlukerRotation
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.