pub struct Sim3 { /* private fields */ }Expand description
Sim(3) group element representing similarity transformations in 3D.
Stored as a flat SVector<f64, 8> = [tx, ty, tz, qw, qx, qy, qz, scale].
Implementations§
Source§impl Sim3
impl Sim3
Sourcepub fn jacobian_identity() -> Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>
pub fn jacobian_identity() -> Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>
Get the identity matrix for Jacobians.
Sourcepub fn new(
translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>,
rotation: Unit<Quaternion<f64>>,
scale: f64,
) -> Sim3
pub fn new( translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, rotation: Unit<Quaternion<f64>>, scale: f64, ) -> Sim3
Create a new Sim(3) element from translation, rotation, and scale.
§Arguments
translation- Translation vector [x, y, z]rotation- Unit quaternion representing rotationscale- Scale factor (must be positive)
Sourcepub fn from_components(
translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>,
rotation: SO3,
scale: f64,
) -> Sim3
pub fn from_components( translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, rotation: SO3, scale: f64, ) -> Sim3
Create Sim(3) from components.
Sourcepub fn translation(
&self,
) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
pub fn translation( &self, ) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
Get the translation part as a Vector3.
Sourcepub fn rotation_so3(&self) -> SO3
pub fn rotation_so3(&self) -> SO3
Get the rotation part as SO3.
Sourcepub fn rotation_quaternion(&self) -> Unit<Quaternion<f64>>
pub fn rotation_quaternion(&self) -> Unit<Quaternion<f64>>
Get the rotation part as a UnitQuaternion.
Sourcepub fn rotation_matrix(
&self,
) -> Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>
pub fn rotation_matrix( &self, ) -> Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>
Get the rotation matrix (3x3).
Trait Implementations§
Source§impl LieGroup for Sim3
impl LieGroup for Sim3
Source§fn inverse(
&self,
jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>,
) -> Sim3
fn inverse( &self, jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>, ) -> Sim3
Get the inverse.
For Sim(3): g^{-1} = (R^T, -R^T * t / s, 1/s)
Source§fn compose(
&self,
other: &Sim3,
jacobian_self: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>,
jacobian_other: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>,
) -> Sim3
fn compose( &self, other: &Sim3, jacobian_self: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>, jacobian_other: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>, ) -> Sim3
Composition of this and another Sim(3) element.
g1 ∘ g2 = (R1R2, s1R1t2 + t1, s1s2)
Source§fn log(
&self,
jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>,
) -> <Sim3 as LieGroup>::TangentVector
fn log( &self, jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>, ) -> <Sim3 as LieGroup>::TangentVector
Logarithmic map from Sim(3) to its tangent space.
Source§type TangentVector = Sim3Tangent
type TangentVector = Sim3Tangent
Source§type JacobianMatrix = Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>
type JacobianMatrix = Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>
Source§type LieAlgebra = Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>
type LieAlgebra = Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>
Source§fn act(
&self,
vector: &Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>,
jacobian_self: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>,
jacobian_vector: Option<&mut Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>>,
) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
fn act( &self, vector: &Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, jacobian_self: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>, jacobian_vector: Option<&mut Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>>, ) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
Source§fn is_valid(&self, tolerance: f64) -> bool
fn is_valid(&self, tolerance: f64) -> bool
Source§fn as_param_slice(&self) -> &[f64]
fn as_param_slice(&self) -> &[f64]
Source§fn as_param_slice_mut(&mut self) -> &mut [f64]
fn as_param_slice_mut(&mut self) -> &mut [f64]
Source§fn from_param_slice(s: &[f64]) -> Sim3
fn from_param_slice(s: &[f64]) -> Sim3
as_param_slice).Source§fn is_approx(&self, other: &Sim3, tolerance: f64) -> bool
fn is_approx(&self, other: &Sim3, tolerance: f64) -> bool
Source§fn jacobian_identity() -> <Sim3 as LieGroup>::JacobianMatrix
fn jacobian_identity() -> <Sim3 as LieGroup>::JacobianMatrix
Source§fn zero_jacobian() -> <Sim3 as LieGroup>::JacobianMatrix
fn zero_jacobian() -> <Sim3 as LieGroup>::JacobianMatrix
Source§fn right_plus(
&self,
tangent: &Self::TangentVector,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
) -> Self
fn right_plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn right_minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn right_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn left_plus(
&self,
tangent: &Self::TangentVector,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
jacobian_self: Option<&mut Self::JacobianMatrix>,
) -> Self
fn left_plus( &self, tangent: &Self::TangentVector, jacobian_tangent: Option<&mut Self::JacobianMatrix>, jacobian_self: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn left_minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn left_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn plus(
&self,
tangent: &Self::TangentVector,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
) -> Self
fn plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn between(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self
fn between( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn tangent_dim(&self) -> usize
fn tangent_dim(&self) -> usize
impl StructuralPartialEq for Sim3
Source§impl Tangent<Sim3> for Sim3Tangent
impl Tangent<Sim3> for Sim3Tangent
Source§fn exp(&self, jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>) -> Sim3
fn exp(&self, jacobian: Option<&mut <Sim3 as LieGroup>::JacobianMatrix>) -> Sim3
Exponential map to Sim(3).
Source§fn right_jacobian(&self) -> <Sim3 as LieGroup>::JacobianMatrix
fn right_jacobian(&self) -> <Sim3 as LieGroup>::JacobianMatrix
Right Jacobian for Sim(3).
Source§fn left_jacobian(&self) -> <Sim3 as LieGroup>::JacobianMatrix
fn left_jacobian(&self) -> <Sim3 as LieGroup>::JacobianMatrix
Left Jacobian for Sim(3).
Source§fn right_jacobian_inv(&self) -> <Sim3 as LieGroup>::JacobianMatrix
fn right_jacobian_inv(&self) -> <Sim3 as LieGroup>::JacobianMatrix
Inverse of right Jacobian.
Source§fn left_jacobian_inv(&self) -> <Sim3 as LieGroup>::JacobianMatrix
fn left_jacobian_inv(&self) -> <Sim3 as LieGroup>::JacobianMatrix
Inverse of left Jacobian.
Source§fn hat(&self) -> <Sim3 as LieGroup>::LieAlgebra
fn hat(&self) -> <Sim3 as LieGroup>::LieAlgebra
Hat operator: maps tangent vector to Lie algebra matrix (4x4).
Source§fn normalized(&self) -> <Sim3 as LieGroup>::TangentVector
fn normalized(&self) -> <Sim3 as LieGroup>::TangentVector
Source§fn from_slice(s: &[f64]) -> Sim3Tangent
fn from_slice(s: &[f64]) -> Sim3Tangent
as_slice).Source§fn small_adj(&self) -> <Sim3 as LieGroup>::JacobianMatrix
fn small_adj(&self) -> <Sim3 as LieGroup>::JacobianMatrix
Source§fn lie_bracket(&self, other: &Sim3Tangent) -> <Sim3 as LieGroup>::TangentVector
fn lie_bracket(&self, other: &Sim3Tangent) -> <Sim3 as LieGroup>::TangentVector
Source§fn is_approx(&self, other: &Sim3Tangent, tolerance: f64) -> bool
fn is_approx(&self, other: &Sim3Tangent, tolerance: f64) -> bool
Source§fn generator(&self, i: usize) -> <Sim3 as LieGroup>::LieAlgebra
fn generator(&self, i: usize) -> <Sim3 as LieGroup>::LieAlgebra
Source§fn is_dynamic() -> bool
fn is_dynamic() -> bool
Auto Trait Implementations§
impl Freeze for Sim3
impl RefUnwindSafe for Sim3
impl Send for Sim3
impl Sync for Sim3
impl Unpin for Sim3
impl UnsafeUnpin for Sim3
impl UnwindSafe for Sim3
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> ErrorLogging for Twhere
T: Display,
impl<T> ErrorLogging for Twhere
T: Display,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
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.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.