Enum GeneralCameraEnum

Source
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>

Source

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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug + IsScalar<BATCH, DM, DN>, const BATCH: usize, const DM: usize, const DN: usize> Debug for GeneralCameraEnum<S, BATCH, DM, DN>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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>

Source§

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

Creates a new Kannala-Brandt camera
Source§

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

Creates a new Enhanced Unified camera
Source§

fn image_size(&self) -> ImageSize

Returns the image size
Source§

fn cam_proj<P>(&self, point_in_camera: P) -> S::Vector<2>
where P: Borrow<S::Vector<3>>,

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>
where P: Borrow<S::Vector<2>>,

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>
where P: Borrow<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>
where P: Borrow<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>
where P: Borrow<S::Vector<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>>

Returns the brown-conrady camera
Source§

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>>

Returns the pinhole camera
Source§

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>
where <S as IsScalar<BATCH, DM, DN>>::Vector<4>: Freeze, <S as IsScalar<BATCH, DM, DN>>::Vector<8>: Freeze, <S as IsScalar<BATCH, DM, DN>>::Vector<12>: Freeze, <S as IsScalar<BATCH, DM, DN>>::Vector<6>: Freeze,

§

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>
where <S as IsScalar<BATCH, DM, DN>>::Vector<4>: Send, <S as IsScalar<BATCH, DM, DN>>::Vector<8>: Send, <S as IsScalar<BATCH, DM, DN>>::Vector<12>: Send, <S as IsScalar<BATCH, DM, DN>>::Vector<6>: Send,

§

impl<S, const BATCH: usize, const DM: usize, const DN: usize> Sync for GeneralCameraEnum<S, BATCH, DM, DN>
where <S as IsScalar<BATCH, DM, DN>>::Vector<4>: Sync, <S as IsScalar<BATCH, DM, DN>>::Vector<8>: Sync, <S as IsScalar<BATCH, DM, DN>>::Vector<12>: Sync, <S as IsScalar<BATCH, DM, DN>>::Vector<6>: Sync,

§

impl<S, const BATCH: usize, const DM: usize, const DN: usize> Unpin for GeneralCameraEnum<S, BATCH, DM, DN>
where <S as IsScalar<BATCH, DM, DN>>::Vector<4>: Unpin, <S as IsScalar<BATCH, DM, DN>>::Vector<8>: Unpin, <S as IsScalar<BATCH, DM, DN>>::Vector<12>: Unpin, <S as IsScalar<BATCH, DM, DN>>::Vector<6>: Unpin, S: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V