[−][src]Struct city2ba::SnavelyCamera
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]
fn project_world(&self, p: &Point3<f64>) -> Point3<f64>
[src]
fn project(&self, p: Point3<f64>) -> Point2<f64>
[src]
fn from_position_direction(position: Point3<f64>, dir: Basis3<f64>) -> Self
[src]
fn center(&self) -> Point3<f64>
[src]
fn transform(self, delta_dir: Basis3<f64>, delta_loc: Vector3<f64>) -> Self
[src]
fn to_world(&self, p: Point3<f64>) -> Point3<f64>
[src]
impl Clone for SnavelyCamera
[src]
fn clone(&self) -> SnavelyCamera
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SnavelyCamera
[src]
Auto Trait Implementations
impl RefUnwindSafe for SnavelyCamera
impl Send for SnavelyCamera
impl Sync for SnavelyCamera
impl Unpin for SnavelyCamera
impl UnwindSafe for SnavelyCamera
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,