pub struct SpatialVec {
pub data: Vec6,
}Expand description
6D spatial vector — either a motion vector (twist) or force vector (wrench).
Fields§
§data: Vec6The underlying 6D vector [angular(3); linear(3)].
Implementations§
Source§impl SpatialVec
impl SpatialVec
Sourcepub fn cross_motion(&self, other: &SpatialVec) -> SpatialVec
pub fn cross_motion(&self, other: &SpatialVec) -> SpatialVec
Spatial cross product for motion vectors: v ×ₘ w Used in velocity propagation.
Sourcepub fn cross_force(&self, other: &SpatialVec) -> SpatialVec
pub fn cross_force(&self, other: &SpatialVec) -> SpatialVec
Spatial cross product for force vectors: v ×f f Used in bias force computation.
Sourcepub fn dot(&self, other: &SpatialVec) -> f64
pub fn dot(&self, other: &SpatialVec) -> f64
Dot product of two spatial vectors.
Sourcepub fn from_linear_angular(linear: Vec3, angular: Vec3) -> Self
pub fn from_linear_angular(linear: Vec3, angular: Vec3) -> Self
Create from linear and angular parts (convenient alternative order).
Trait Implementations§
Source§impl Add for SpatialVec
impl Add for SpatialVec
Source§type Output = SpatialVec
type Output = SpatialVec
The resulting type after applying the
+ operator.Source§fn add(self, rhs: SpatialVec) -> SpatialVec
fn add(self, rhs: SpatialVec) -> SpatialVec
Performs the
+ operation. Read moreSource§impl Clone for SpatialVec
impl Clone for SpatialVec
Source§fn clone(&self) -> SpatialVec
fn clone(&self) -> SpatialVec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpatialVec
impl Debug for SpatialVec
Source§impl Mul<f64> for SpatialVec
impl Mul<f64> for SpatialVec
Source§type Output = SpatialVec
type Output = SpatialVec
The resulting type after applying the
* operator.Source§impl Neg for SpatialVec
impl Neg for SpatialVec
Source§type Output = SpatialVec
type Output = SpatialVec
The resulting type after applying the
- operator.Source§fn neg(self) -> SpatialVec
fn neg(self) -> SpatialVec
Performs the unary
- operation. Read moreSource§impl Sub for SpatialVec
impl Sub for SpatialVec
Source§type Output = SpatialVec
type Output = SpatialVec
The resulting type after applying the
- operator.Source§fn sub(self, rhs: SpatialVec) -> SpatialVec
fn sub(self, rhs: SpatialVec) -> SpatialVec
Performs the
- operation. Read moreimpl Copy for SpatialVec
Auto Trait Implementations§
impl Freeze for SpatialVec
impl RefUnwindSafe for SpatialVec
impl Send for SpatialVec
impl Sync for SpatialVec
impl Unpin for SpatialVec
impl UnsafeUnpin for SpatialVec
impl UnwindSafe for SpatialVec
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
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.