[][src]Struct city2ba::SnavelyCamera

pub struct SnavelyCamera {
    pub loc: Vector3<f64>,
    pub dir: Basis3<f64>,
    pub intrin: Vector3<f64>,
}

Camera expressed as Rx+t with intrinsics.

The camera points down the negative z axis. Up is the positive y axis.

Fields

loc: Vector3<f64>

Translational parameter t

dir: Basis3<f64>

Rotational parameter R

intrin: Vector3<f64>

Intrinsics. intrin[0] is the focal length, intrin[1] is the squared distortion, and intrin[2] is the quadratic distortion.

Methods

impl SnavelyCamera[src]

pub fn from_vec(x: Vec<f64>) -> Self[src]

Parse a camera from a vector of parameters. Order is rotation as a 3 element Rodrigues vector, translation, intrinsics.

pub fn to_vec(&self) -> Vec<f64>[src]

Parse a camera to a vector of parameters. Order is rotation as a 3 element Rodrigues vector, translation, intrinsics.

pub fn rotation(&self) -> Basis3<f64>[src]

R parameter of camera.

pub fn focal_length(&self) -> f64[src]

pub fn distortion(&self) -> (f64, f64)[src]

pub fn modify_intrin(self, delta: Vector3<f64>) -> Self[src]

Adjust the intrinsics of the camera as intrin + delta.

Trait Implementations

impl Camera for SnavelyCamera[src]

impl Clone for SnavelyCamera[src]

impl Debug for SnavelyCamera[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.