pub struct Sim3 { /* private fields */ }Expand description
Sim(3) group element representing similarity transformations in 3D.
Represented as (rotation, translation, 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 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
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 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
impl StructuralPartialEq for Sim3
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§
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<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,
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> Pointable for T
impl<T> Pointable for T
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.