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§
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 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§
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 copy 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>
impl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for ExtrinsicParameters<R>
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: PartialEq + RealField> PartialEq<ExtrinsicParameters<R>> for ExtrinsicParameters<R>
impl<R: PartialEq + RealField> PartialEq<ExtrinsicParameters<R>> for ExtrinsicParameters<R>
source§fn 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 ==.source§impl<R> Serialize for ExtrinsicParameters<R>where
R: Serialize + RealField,
impl<R> Serialize for ExtrinsicParameters<R>where
R: Serialize + RealField,
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§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
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.