[−][src]Struct cv::WorldPose
This contains a world pose, which is a pose of the world relative to the camera.
This maps WorldPoint
into CameraPoint
, changing an absolute position into
a vector relative to the camera.
Implementations
impl WorldPose
[src]
pub fn from_parts(
rotation: Rotation<f64, U3>,
translation: Matrix<f64, U3, U1, <DefaultAllocator as Allocator<f64, U3, U1>>::Buffer>
) -> WorldPose
[src]
rotation: Rotation<f64, U3>,
translation: Matrix<f64, U3, U1, <DefaultAllocator as Allocator<f64, U3, U1>>::Buffer>
) -> WorldPose
Create the pose from rotation and translation.
pub fn identity() -> WorldPose
[src]
Methods from Deref<Target = Isometry<f64, U3, Rotation<f64, U3>>>
#[must_use = "Did you mean to use inverse_mut()?"]pub fn inverse(&self) -> Isometry<N, D, R>
[src]
Inverts self
.
Example
let iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); let inv = iso.inverse(); let pt = Point2::new(1.0, 2.0); assert_eq!(inv * (iso * pt), pt);
pub fn inverse_mut(&mut self)
[src]
Inverts self
in-place.
Example
let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); let pt = Point2::new(1.0, 2.0); let transformed_pt = iso * pt; iso.inverse_mut(); assert_eq!(iso * transformed_pt, pt);
pub fn append_translation_mut(&mut self, t: &Translation<N, D>)
[src]
Appends to self
the given translation in-place.
Example
let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); let tra = Translation2::new(3.0, 4.0); // Same as `iso = tra * iso`. iso.append_translation_mut(&tra); assert_eq!(iso.translation, Translation2::new(4.0, 6.0));
pub fn append_rotation_mut(&mut self, r: &R)
[src]
Appends to self
the given rotation in-place.
Example
let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::PI / 6.0); let rot = UnitComplex::new(f32::consts::PI / 2.0); // Same as `iso = rot * iso`. iso.append_rotation_mut(&rot); assert_relative_eq!(iso, Isometry2::new(Vector2::new(-2.0, 1.0), f32::consts::PI * 2.0 / 3.0), epsilon = 1.0e-6);
pub fn append_rotation_wrt_point_mut(&mut self, r: &R, p: &Point<N, D>)
[src]
Appends in-place to self
a rotation centered at the point p
, i.e., the rotation that
lets p
invariant.
Example
let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); let rot = UnitComplex::new(f32::consts::FRAC_PI_2); let pt = Point2::new(1.0, 0.0); iso.append_rotation_wrt_point_mut(&rot, &pt); assert_relative_eq!(iso * pt, Point2::new(-2.0, 0.0), epsilon = 1.0e-6);
pub fn append_rotation_wrt_center_mut(&mut self, r: &R)
[src]
Appends in-place to self
a rotation centered at the point with coordinates
self.translation
.
Example
let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); let rot = UnitComplex::new(f32::consts::FRAC_PI_2); iso.append_rotation_wrt_center_mut(&rot); // The translation part should not have changed. assert_eq!(iso.translation.vector, Vector2::new(1.0, 2.0)); assert_eq!(iso.rotation, UnitComplex::new(f32::consts::PI));
pub fn transform_point(&self, pt: &Point<N, D>) -> Point<N, D>
[src]
Transform the given point by this isometry.
This is the same as the multiplication self * pt
.
Example
let tra = Translation3::new(0.0, 0.0, 3.0); let rot = UnitQuaternion::from_scaled_axis(Vector3::y() * f32::consts::FRAC_PI_2); let iso = Isometry3::from_parts(tra, rot); let transformed_point = iso.transform_point(&Point3::new(1.0, 2.0, 3.0)); assert_relative_eq!(transformed_point, Point3::new(3.0, 2.0, 2.0), epsilon = 1.0e-6);
pub fn transform_vector(
&self,
v: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
[src]
&self,
v: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
Transform the given vector by this isometry, ignoring the translation component of the isometry.
This is the same as the multiplication self * v
.
Example
let tra = Translation3::new(0.0, 0.0, 3.0); let rot = UnitQuaternion::from_scaled_axis(Vector3::y() * f32::consts::FRAC_PI_2); let iso = Isometry3::from_parts(tra, rot); let transformed_point = iso.transform_vector(&Vector3::new(1.0, 2.0, 3.0)); assert_relative_eq!(transformed_point, Vector3::new(3.0, 2.0, -1.0), epsilon = 1.0e-6);
pub fn inverse_transform_point(&self, pt: &Point<N, D>) -> Point<N, D>
[src]
Transform the given point by the inverse of this isometry. This may be less expensive than computing the entire isometry inverse and then transforming the point.
Example
let tra = Translation3::new(0.0, 0.0, 3.0); let rot = UnitQuaternion::from_scaled_axis(Vector3::y() * f32::consts::FRAC_PI_2); let iso = Isometry3::from_parts(tra, rot); let transformed_point = iso.inverse_transform_point(&Point3::new(1.0, 2.0, 3.0)); assert_relative_eq!(transformed_point, Point3::new(0.0, 2.0, 1.0), epsilon = 1.0e-6);
pub fn inverse_transform_vector(
&self,
v: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
[src]
&self,
v: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
Transform the given vector by the inverse of this isometry, ignoring the translation component of the isometry. This may be less expensive than computing the entire isometry inverse and then transforming the point.
Example
let tra = Translation3::new(0.0, 0.0, 3.0); let rot = UnitQuaternion::from_scaled_axis(Vector3::y() * f32::consts::FRAC_PI_2); let iso = Isometry3::from_parts(tra, rot); let transformed_point = iso.inverse_transform_vector(&Vector3::new(1.0, 2.0, 3.0)); assert_relative_eq!(transformed_point, Vector3::new(-3.0, 2.0, 1.0), epsilon = 1.0e-6);
pub fn to_homogeneous(
&self
) -> Matrix<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output, <DefaultAllocator as Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>>::Buffer> where
D: DimNameAdd<U1>,
R: SubsetOf<Matrix<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output, <DefaultAllocator as Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>>::Buffer>>,
DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>,
[src]
&self
) -> Matrix<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output, <DefaultAllocator as Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>>::Buffer> where
D: DimNameAdd<U1>,
R: SubsetOf<Matrix<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output, <DefaultAllocator as Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>>::Buffer>>,
DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, <D as DimNameAdd<U1>>::Output>,
Converts this isometry into its equivalent homogeneous transformation matrix.
Example
let iso = Isometry2::new(Vector2::new(10.0, 20.0), f32::consts::FRAC_PI_6); let expected = Matrix3::new(0.8660254, -0.5, 10.0, 0.5, 0.8660254, 20.0, 0.0, 0.0, 1.0); assert_relative_eq!(iso.to_homogeneous(), expected, epsilon = 1.0e-6);
Trait Implementations
impl AsMut<Isometry<f64, U3, Rotation<f64, U3>>> for WorldPose
[src]
impl AsRef<Isometry<f64, U3, Rotation<f64, U3>>> for WorldPose
[src]
impl Clone for WorldPose
[src]
impl Copy for WorldPose
[src]
impl Debug for WorldPose
[src]
impl Deref for WorldPose
[src]
type Target = Isometry<f64, U3, Rotation<f64, U3>>
The resulting type after dereferencing.
fn deref(&self) -> &<WorldPose as Deref>::Target
[src]
impl DerefMut for WorldPose
[src]
impl From<CameraPose> for WorldPose
[src]
fn from(camera: CameraPose) -> WorldPose
[src]
impl From<Isometry<f64, U3, Rotation<f64, U3>>> for WorldPose
[src]
impl From<WorldPose> for Isometry<f64, U3, Rotation<f64, U3>>
[src]
impl From<WorldPose> for CameraPose
[src]
fn from(world: WorldPose) -> CameraPose
[src]
impl<P> Model<FeatureWorldMatch<P>> for WorldPose where
P: Bearing,
[src]
P: Bearing,
fn residual(&self, data: &FeatureWorldMatch<P>) -> f32
[src]
impl PartialEq<WorldPose> for WorldPose
[src]
impl Pose for WorldPose
[src]
type InputPoint = WorldPoint
type OutputPoint = CameraPoint
fn transform_jacobians(
&self,
input: <WorldPose as Pose>::InputPoint
) -> (<WorldPose as Pose>::OutputPoint, Matrix<f64, U3, U3, <DefaultAllocator as Allocator<f64, U3, U3>>::Buffer>, Matrix<f64, U6, U3, <DefaultAllocator as Allocator<f64, U6, U3>>::Buffer>)
[src]
&self,
input: <WorldPose as Pose>::InputPoint
) -> (<WorldPose as Pose>::OutputPoint, Matrix<f64, U3, U3, <DefaultAllocator as Allocator<f64, U3, U3>>::Buffer>, Matrix<f64, U6, U3, <DefaultAllocator as Allocator<f64, U6, U3>>::Buffer>)
fn update(
&mut self,
delta: Matrix<f64, U6, U1, <DefaultAllocator as Allocator<f64, U6, U1>>::Buffer>
)
[src]
&mut self,
delta: Matrix<f64, U6, U1, <DefaultAllocator as Allocator<f64, U6, U1>>::Buffer>
)
fn transform_jacobian_input(
&self,
input: Self::InputPoint
) -> (Self::OutputPoint, Matrix<f64, U3, U3, <DefaultAllocator as Allocator<f64, U3, U3>>::Buffer>)
[src]
&self,
input: Self::InputPoint
) -> (Self::OutputPoint, Matrix<f64, U3, U3, <DefaultAllocator as Allocator<f64, U3, U3>>::Buffer>)
fn transform_jacobian_pose(
&self,
input: Self::InputPoint
) -> (Self::OutputPoint, Matrix<f64, U6, U3, <DefaultAllocator as Allocator<f64, U6, U3>>::Buffer>)
[src]
&self,
input: Self::InputPoint
) -> (Self::OutputPoint, Matrix<f64, U6, U3, <DefaultAllocator as Allocator<f64, U6, U3>>::Buffer>)
fn transform(&self, input: Self::InputPoint) -> Self::OutputPoint
[src]
impl StructuralPartialEq for WorldPose
[src]
Auto Trait Implementations
impl RefUnwindSafe for WorldPose
impl Send for WorldPose
impl Sync for WorldPose
impl Unpin for WorldPose
impl UnwindSafe for WorldPose
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,