pub struct ExtrinsicParameters<R: RealField> { /* private fields */ }Expand description
Defines the pose of a camera in the world coordinate system.
Implementations§
Source§impl<R: RealField> ExtrinsicParameters<R>
impl<R: RealField> ExtrinsicParameters<R>
Sourcepub fn from_rotation_and_camcenter(
rotation: UnitQuaternion<R>,
camcenter: Point3<R>,
) -> Self
pub fn from_rotation_and_camcenter( rotation: UnitQuaternion<R>, camcenter: Point3<R>, ) -> Self
Create a new instance from a rotation and a camera center.
Sourcepub fn from_pose(pose: &Isometry3<R>) -> Self
pub fn from_pose(pose: &Isometry3<R>) -> Self
Create a new instance from an nalgebra::Isometry3.
Sourcepub fn from_view(
camcenter: &Vector3<R>,
lookat: &Vector3<R>,
up: &Unit<Vector3<R>>,
) -> Self
pub fn from_view( camcenter: &Vector3<R>, lookat: &Vector3<R>, up: &Unit<Vector3<R>>, ) -> Self
Create a new instance from a camera center, a lookat vector, and an up vector.
Sourcepub fn rotation(&self) -> &Rotation3<R>
pub fn rotation(&self) -> &Rotation3<R>
Return the rotation part of the pose
To obtain the rotation as a quaternion, use Self::pose to obtain an Isometry3 and access the Isometry3::rotation field.
Sourcepub fn translation(&self) -> &Point3<R>
pub fn translation(&self) -> &Point3<R>
Return the translation part of the pose
Sourcepub fn forward(&self) -> Unit<Vector3<R>>
pub fn forward(&self) -> Unit<Vector3<R>>
Return a unit vector aligned along our look (+Z) direction.
Sourcepub fn right(&self) -> Unit<Vector3<R>>
pub fn right(&self) -> Unit<Vector3<R>>
Return a unit vector aligned along our right (+X) direction.
Sourcepub fn camera_to_world<NPTS, InStorage>(
&self,
cam_coords: &Points<CameraFrame, R, NPTS, InStorage>,
) -> Points<WorldFrame, R, NPTS, Owned<R, NPTS, U3>>
pub fn camera_to_world<NPTS, InStorage>( &self, cam_coords: &Points<CameraFrame, R, NPTS, InStorage>, ) -> Points<WorldFrame, R, NPTS, Owned<R, NPTS, U3>>
Convert points in camera coordinates to world coordinates.
Sourcepub fn ray_camera_to_world<BType, NPTS, StorageCamera>(
&self,
camera: &RayBundle<CameraFrame, BType, R, NPTS, StorageCamera>,
) -> RayBundle<WorldFrame, BType, R, NPTS, Owned<R, NPTS, U3>>
pub fn ray_camera_to_world<BType, NPTS, StorageCamera>( &self, camera: &RayBundle<CameraFrame, BType, R, NPTS, StorageCamera>, ) -> RayBundle<WorldFrame, BType, R, NPTS, Owned<R, NPTS, U3>>
Convert rays in camera coordinates to world coordinates.
Sourcepub fn world_to_camera<NPTS, InStorage>(
&self,
world: &Points<WorldFrame, R, NPTS, InStorage>,
) -> Points<CameraFrame, R, NPTS, Owned<R, NPTS, U3>>
pub fn world_to_camera<NPTS, InStorage>( &self, world: &Points<WorldFrame, R, NPTS, InStorage>, ) -> Points<CameraFrame, R, NPTS, Owned<R, NPTS, U3>>
Convert points in world coordinates to camera coordinates.
Trait Implementations§
Source§impl<R: Clone + RealField> Clone for ExtrinsicParameters<R>
impl<R: Clone + RealField> Clone for ExtrinsicParameters<R>
Source§fn clone(&self) -> ExtrinsicParameters<R>
fn clone(&self) -> ExtrinsicParameters<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: RealField> Debug for ExtrinsicParameters<R>
impl<R: RealField> Debug for ExtrinsicParameters<R>
Source§impl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for ExtrinsicParameters<R>
Available on crate feature serde-serialize only.
impl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for ExtrinsicParameters<R>
Available on crate feature
serde-serialize only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<R> Serialize for ExtrinsicParameters<R>
impl<R> Serialize for ExtrinsicParameters<R>
impl<R: RealField> StructuralPartialEq for ExtrinsicParameters<R>
Auto Trait Implementations§
impl<R> Freeze for ExtrinsicParameters<R>where
R: Freeze,
impl<R> RefUnwindSafe for ExtrinsicParameters<R>where
R: RefUnwindSafe,
impl<R> Send for ExtrinsicParameters<R>
impl<R> Sync for ExtrinsicParameters<R>
impl<R> Unpin for ExtrinsicParameters<R>where
R: Unpin,
impl<R> UnsafeUnpin for ExtrinsicParameters<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for ExtrinsicParameters<R>where
R: UnwindSafe,
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<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.