pub struct Pose {
pub rotation: Rotation3<f64>,
pub translation: Vector3<f64>,
}Expand description
Where a camera is and which way it faces, stored as the transform from world
coordinates into the camera’s frame: x_cam = R · x_world + t.
The camera frame is the usual computer-vision one: x to the right of the image, y down, z forward along the optical axis.
Fields§
§rotation: Rotation3<f64>R: world axes into camera axes.
translation: Vector3<f64>t: the world origin, in the camera’s frame.
Implementations§
Source§impl Pose
impl Pose
Sourcepub fn look_at(
eye: &Point3<f64>,
target: &Point3<f64>,
up: &Vector3<f64>,
) -> Self
pub fn look_at( eye: &Point3<f64>, target: &Point3<f64>, up: &Vector3<f64>, ) -> Self
A camera at eye looking at target, oriented so that up points up in the image.
up need not be exactly perpendicular to the viewing direction, but must not be
parallel to it.
Sourcepub fn to_camera(&self, point: &Point3<f64>) -> Point3<f64>
pub fn to_camera(&self, point: &Point3<f64>) -> Point3<f64>
A world point in this camera’s frame.
Sourcepub fn project(&self, point: &World) -> Option<Norm>
pub fn project(&self, point: &World) -> Option<Norm>
Where a world point lands in this camera, or None if it is not in front of it.
Sourcepub fn relative_to(&self, reference: &Pose) -> Pose
pub fn relative_to(&self, reference: &Pose) -> Pose
This pose expressed in reference’s camera frame: the transform from reference’s
camera coordinates into this camera’s.
Trait Implementations§
impl Copy for Pose
impl StructuralPartialEq for Pose
Auto Trait Implementations§
impl Forget for Pose
impl Freeze for Pose
impl Move for Pose
impl RefUnwindSafe for Pose
impl Send for Pose
impl Sync for Pose
impl Unpin for Pose
impl UnsafeUnpin for Pose
impl UnwindSafe for Pose
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<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> ⓘ
Converts
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> ⓘ
Converts
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
impl<T> Scalar 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>
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.