pub struct SpatialVector<T, K> {
pub data: Vector6<T>,
/* private fields */
}Expand description
A 6-D spatial vector v = [angular (top 3); linear (bottom 3)], tagged by
K ∈ {Motion, Force} to control cross-product and transform
semantics (Featherstone’s crm / crf operators).
- A
MotionVectoris(ω, v)(angular velocity, linear velocity). - A
ForceVectoris(n, f)(moment, force).
See the crate-level documentation for the full convention.
Fields§
§data: Vector6<T>The raw 6-components [angular₀, angular₁, angular₂, linear₀, linear₁, linear₂].
Implementations§
Source§impl<T: Scalar + Copy> SpatialVector<T, Motion>
impl<T: Scalar + Copy> SpatialVector<T, Motion>
Sourcepub fn new(angular: Vector3<T>, linear: Vector3<T>) -> Self
pub fn new(angular: Vector3<T>, linear: Vector3<T>) -> Self
Build a motion vector from its angular (top) and linear (bottom) halves.
Sourcepub fn cross(&self, rhs: &SpatialVector<T, Motion>) -> SpatialVector<T, Motion>
pub fn cross(&self, rhs: &SpatialVector<T, Motion>) -> SpatialVector<T, Motion>
motion ⊗ motion → motion (Featherstone crm).
Sourcepub fn cross_force(
&self,
rhs: &SpatialVector<T, Force>,
) -> SpatialVector<T, Force>
pub fn cross_force( &self, rhs: &SpatialVector<T, Force>, ) -> SpatialVector<T, Force>
motion ⊗ force → force (Featherstone crm applied to a force).
Sourcepub fn transform_by(&self, iso: &Isometry3<T>) -> Self
pub fn transform_by(&self, iso: &Isometry3<T>) -> Self
Transform this motion vector by an Isometry3 using the motion
Plücker adjoint [R, 0; t×R, R].
For a pure rotation this reduces to R acting on both halves, matching
Isometry3::transform_vector componentwise.
Source§impl<T: Scalar + Copy> SpatialVector<T, Force>
impl<T: Scalar + Copy> SpatialVector<T, Force>
Sourcepub fn new(angular: Vector3<T>, linear: Vector3<T>) -> Self
pub fn new(angular: Vector3<T>, linear: Vector3<T>) -> Self
Build a force vector from its angular (moment, top) and linear (force, bottom) halves.
Sourcepub fn cross_motion(
&self,
rhs: &SpatialVector<T, Motion>,
) -> SpatialVector<T, Force>
pub fn cross_motion( &self, rhs: &SpatialVector<T, Motion>, ) -> SpatialVector<T, Force>
force ⊗ motion → force (Featherstone crf).
Sourcepub fn cross(&self, rhs: &SpatialVector<T, Force>) -> SpatialVector<T, Motion>
pub fn cross(&self, rhs: &SpatialVector<T, Force>) -> SpatialVector<T, Motion>
force ⊗ force → motion (Featherstone crf).
Sourcepub fn transform_by(&self, iso: &Isometry3<T>) -> Self
pub fn transform_by(&self, iso: &Isometry3<T>) -> Self
Transform this force vector by an Isometry3 using the force
Plücker adjoint [R, t×R; 0, R].
For a pure rotation this reduces to R acting on both halves, matching
Isometry3::transform_vector componentwise.