pub enum GeneralCameraEnum<S: IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> {
Perspective(PerspectiveCameraEnum<S, BATCH, DM, DN>),
Orthographic(OrthographicCamera<S, BATCH, DM, DN>),
}
Expand description
Generalized camera enum
Variants§
Perspective(PerspectiveCameraEnum<S, BATCH, DM, DN>)
Perspective camera enum
Orthographic(OrthographicCamera<S, BATCH, DM, DN>)
Orthographic camera
Implementations§
Source§impl<S: IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> GeneralCameraEnum<S, BATCH, DM, DN>
impl<S: IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> GeneralCameraEnum<S, BATCH, DM, DN>
Sourcepub fn new_perspective(model: PerspectiveCameraEnum<S, BATCH, DM, DN>) -> Self
pub fn new_perspective(model: PerspectiveCameraEnum<S, BATCH, DM, DN>) -> Self
Create a new perspective camera instance
Trait Implementations§
Source§impl<S: Clone + IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> Clone for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S: Clone + IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> Clone for GeneralCameraEnum<S, BATCH, DM, DN>
Source§fn clone(&self) -> GeneralCameraEnum<S, BATCH, DM, DN>
fn clone(&self) -> GeneralCameraEnum<S, BATCH, DM, DN>
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<S: Debug + IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> Debug for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S: Debug + IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> Debug for GeneralCameraEnum<S, BATCH, DM, DN>
Source§impl<S: IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> IsCamera<S, BATCH, DM, DN> for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S: IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> IsCamera<S, BATCH, DM, DN> for GeneralCameraEnum<S, BATCH, DM, DN>
Source§fn new_pinhole(params: S::Vector<4>, image_size: ImageSize) -> Self
fn new_pinhole(params: S::Vector<4>, image_size: ImageSize) -> Self
Creates a new pinhole camera
Source§fn new_kannala_brandt(params: S::Vector<8>, image_size: ImageSize) -> Self
fn new_kannala_brandt(params: S::Vector<8>, image_size: ImageSize) -> Self
Creates a new Kannala-Brandt camera
Source§fn new_brown_conrady(params: S::Vector<12>, image_size: ImageSize) -> Self
fn new_brown_conrady(params: S::Vector<12>, image_size: ImageSize) -> Self
Creates a new Brown-Conrady camera
Source§fn new_enhanced_unified(params: S::Vector<6>, image_size: ImageSize) -> Self
fn new_enhanced_unified(params: S::Vector<6>, image_size: ImageSize) -> Self
Creates a new Enhanced Unified camera
Source§fn image_size(&self) -> ImageSize
fn image_size(&self) -> ImageSize
Returns the image size
Source§fn cam_proj<P>(&self, point_in_camera: P) -> S::Vector<2>
fn cam_proj<P>(&self, point_in_camera: P) -> S::Vector<2>
Projects a 3D point in the camera frame to a pixel in the image
Source§fn cam_unproj_with_z<P>(&self, pixel: P, z: S) -> S::Vector<3>
fn cam_unproj_with_z<P>(&self, pixel: P, z: S) -> S::Vector<3>
Unprojects a pixel in the image to a 3D point in the camera frame
Source§fn distort<P>(&self, proj_point_in_camera_z1_plane: P) -> S::Vector<2>
fn distort<P>(&self, proj_point_in_camera_z1_plane: P) -> S::Vector<2>
Distortion - maps a point in the camera z=1 plane to a distorted point
Source§fn undistort<P>(&self, pixel: P) -> S::Vector<2>
fn undistort<P>(&self, pixel: P) -> S::Vector<2>
Undistortion - maps a distorted pixel to a point in the camera z=1 plane
Source§fn dx_distort_x<P>(&self, proj_point_in_camera_z1_plane: P) -> S::Matrix<2, 2>
fn dx_distort_x<P>(&self, proj_point_in_camera_z1_plane: P) -> S::Matrix<2, 2>
Derivative of the distortion w.r.t. the point in the camera z=1 plane
Source§fn try_get_brown_conrady(self) -> Option<BrownConradyCamera<S, BATCH, DM, DN>>
fn try_get_brown_conrady(self) -> Option<BrownConradyCamera<S, BATCH, DM, DN>>
Returns the brown-conrady camera
Source§fn try_get_kannala_brandt(self) -> Option<KannalaBrandtCamera<S, BATCH, DM, DN>>
fn try_get_kannala_brandt(self) -> Option<KannalaBrandtCamera<S, BATCH, DM, DN>>
Returns the kannala-brandt camera
Source§fn try_get_pinhole(self) -> Option<PinholeCamera<S, BATCH, DM, DN>>
fn try_get_pinhole(self) -> Option<PinholeCamera<S, BATCH, DM, DN>>
Returns the pinhole camera
Source§fn try_get_enhanced_unified(
self,
) -> Option<EnhancedUnifiedCamera<S, BATCH, DM, DN>>
fn try_get_enhanced_unified( self, ) -> Option<EnhancedUnifiedCamera<S, BATCH, DM, DN>>
Returns the enhanced unified camera
Auto Trait Implementations§
impl<S, const BATCH: usize, const DM: usize, const DN: usize> Freeze for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S, const BATCH: usize, const DM: usize, const DN: usize> RefUnwindSafe for GeneralCameraEnum<S, BATCH, DM, DN>where
<S as IsScalar<BATCH, DM, DN>>::Vector<4>: RefUnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<8>: RefUnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<12>: RefUnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<6>: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, const BATCH: usize, const DM: usize, const DN: usize> Send for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S, const BATCH: usize, const DM: usize, const DN: usize> Sync for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S, const BATCH: usize, const DM: usize, const DN: usize> Unpin for GeneralCameraEnum<S, BATCH, DM, DN>
impl<S, const BATCH: usize, const DM: usize, const DN: usize> UnwindSafe for GeneralCameraEnum<S, BATCH, DM, DN>where
<S as IsScalar<BATCH, DM, DN>>::Vector<4>: UnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<8>: UnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<12>: UnwindSafe,
<S as IsScalar<BATCH, DM, DN>>::Vector<6>: UnwindSafe,
S: 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<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.