Struct cam_geom::ExtrinsicParameters
source · [−]pub struct ExtrinsicParameters<R: RealField> { /* private fields */ }Expand description
Defines the pose of a camera in the world coordinate system.
Implementations
sourceimpl<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 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>> where
NPTS: Dim,
InStorage: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<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>> where
NPTS: Dim,
InStorage: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<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>> where
BType: Bundle<R>,
NPTS: Dim,
StorageCamera: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<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>> where
BType: Bundle<R>,
NPTS: Dim,
StorageCamera: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<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>> where
NPTS: Dim,
InStorage: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<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>> where
NPTS: Dim,
InStorage: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<R, NPTS, U3>,
Convert points in world coordinates to camera coordinates.
Trait Implementations
sourceimpl<R: Clone + RealField> Clone for ExtrinsicParameters<R>
impl<R: Clone + RealField> Clone for ExtrinsicParameters<R>
sourcefn clone(&self) -> ExtrinsicParameters<R>
fn clone(&self) -> ExtrinsicParameters<R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<R: RealField> Debug for ExtrinsicParameters<R>
impl<R: RealField> Debug for ExtrinsicParameters<R>
sourceimpl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for ExtrinsicParameters<R>
impl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for ExtrinsicParameters<R>
sourcefn 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
sourceimpl<R: PartialEq + RealField> PartialEq<ExtrinsicParameters<R>> for ExtrinsicParameters<R>
impl<R: PartialEq + RealField> PartialEq<ExtrinsicParameters<R>> for ExtrinsicParameters<R>
sourcefn eq(&self, other: &ExtrinsicParameters<R>) -> bool
fn eq(&self, other: &ExtrinsicParameters<R>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ExtrinsicParameters<R>) -> bool
fn ne(&self, other: &ExtrinsicParameters<R>) -> bool
This method tests for !=.
sourceimpl<R: RealField> Serialize for ExtrinsicParameters<R> where
R: Serialize,
impl<R: RealField> Serialize for ExtrinsicParameters<R> where
R: Serialize,
impl<R: RealField> StructuralPartialEq for ExtrinsicParameters<R>
Auto Trait Implementations
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> UnwindSafe for ExtrinsicParameters<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
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 more
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).
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.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more