Skip to main content

SpatialMotion

Struct SpatialMotion 

Source
pub struct SpatialMotion(/* private fields */);
Expand description

Spatial motion vector, combining linear and angular velocity components.

The first three elements represent linear velocity, and the last three represent angular velocity.

Implementations§

Source§

impl SpatialMotion

Source

pub fn from_rotational_axis(axis: &Vector3D) -> Self

Creates a new SpatialMotion from a 3D rotational axis (for revolute and continuous joints).

Source

pub fn from_translational_axis(axis: &Vector3D) -> Self

Creates a new SpatialMotion from a 3D translational axis (for prismatic joints).

Source

pub fn rotation(&self) -> Vector3D

Extracts the rotation (angular velocity) component of the spatial motion.

Source

pub fn translation(&self) -> Vector3D

Extracts the translation (linear velocity) component of the spatial motion.

Source

pub fn zero() -> Self

Zero spatial motion (no motion).

Source

pub fn from_parts(linear: Vector3D, angular: Vector3D) -> Self

Creates a SpatialMotion from linear and angular components.

§Arguments
  • linear - The linear velocity component (3D vector).
  • angular - The angular velocity component (3D vector).
Source

pub fn from_vector6d(v: Vector6D) -> Self

Creates a SpatialMotion from a 6D vector.

§Arguments
  • v - The 6D vector representing spatial motion; the first three elements are linear, the last three are angular.
Source

pub fn cross(&self, other: &SpatialMotion) -> SpatialMotion

Computes the cross product of two spatial motion vectors.

§Arguments
  • other - The other spatial motion vector to compute the cross product with.
§Returns

A new SpatialMotion representing the cross product.

Source

pub fn cross_force(&self, other: &SpatialForce) -> SpatialForce

Computes the cross product of two spatial motion vectors.

§Arguments
  • other - The other spatial motion vector to compute the cross product with.
§Returns

A new SpatialMotion representing the cross product.

Source

pub fn cross_star(&self, other: &SpatialMotion) -> SpatialMotion

Computes the dual cross product of two spatial motion vectors.

§Arguments
  • other - The other spatial motion vector to compute the dual cross product with.
§Returns

A new SpatialMotion representing the dual cross product.

Source

pub fn inner(&self, other: &SpatialMotion) -> f64

Computes the inner product of two spatial motion vectors.

Trait Implementations§

Source§

impl ActSE3 for SpatialMotion

Source§

fn act(&self, se3: &SE3) -> Self

Applies the SE(3) transformation to the object.
Source§

fn act_inv(&self, se3: &SE3) -> Self

Applies the inverse SE(3) transformation to the object.
Source§

impl Add<&SpatialMotion> for SpatialMotion

Source§

type Output = SpatialMotion

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for SpatialMotion

Source§

type Output = SpatialMotion

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for SpatialMotion

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for SpatialMotion

Source§

fn clone(&self) -> SpatialMotion

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 SpatialMotion

Source§

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

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

impl Default for SpatialMotion

Source§

fn default() -> SpatialMotion

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

impl Display for SpatialMotion

Source§

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

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

impl Mul<&SpatialMotion> for &SpatialInertia

Source§

type Output = SpatialMotion

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &SpatialMotion) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<SpatialMotion> for f64

Source§

type Output = SpatialMotion

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f64> for &SpatialMotion

Source§

type Output = SpatialMotion

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f64> for SpatialMotion

Source§

type Output = SpatialMotion

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl PartialEq for SpatialMotion

Source§

fn eq(&self, other: &SpatialMotion) -> 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 StructuralPartialEq for SpatialMotion

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

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