Enum trackball::Fixed[][src]

pub enum Fixed<N: RealField> {
    Hor(N),
    Ver(N),
    Upp(N),
}

Fixed quantity wrt field of view.

  • Implements Default and can be created with Fixed::default() returning Fixed::Ver(N::frac_pi_4()).
  • Implements From<N> and can be created with N::into() returning Fixed::Ver().

Variants

Hor(N)

Fixed horizontal field of view aka Vert- scaling.

Ver(N)

Fixed vertical field of view aka Hor+ scaling.

Upp(N)

Fixed unit per pixel on focus plane at distance from eye of one aka Pixel-based scaling.

Implementations

impl<N: RealField> Fixed<N>[src]

pub fn to_hor(&self, max: &Point2<N>) -> Self[src]

Converts to fixed horizontal field of view wrt maximum position in screen space.

pub fn to_ver(&self, max: &Point2<N>) -> Self[src]

Converts to fixed vertical field of view wrt maximum position in screen space.

pub fn to_upp(&self, max: &Point2<N>) -> Self[src]

Converts to fixed unit per pixel on focus plane at distance from eye of one wrt maximum position in screen space.

pub fn max_and_upp(&self, zat: N, max: &Point2<N>) -> (Point2<N>, N)[src]

Maximum position in camera space and unit per pixel on focus plane wrt distance between eye and target and maximum position in screen space.

pub fn into_inner(self) -> N[src]

Underlying quantity.

Trait Implementations

impl<N: Clone + RealField> Clone for Fixed<N>[src]

impl<N: Copy + RealField> Copy for Fixed<N>[src]

impl<N: Debug + RealField> Debug for Fixed<N>[src]

impl<N: RealField> Default for Fixed<N>[src]

impl<N: Eq + RealField> Eq for Fixed<N>[src]

impl<N: RealField> From<N> for Fixed<N>[src]

impl<N: PartialEq + RealField> PartialEq<Fixed<N>> for Fixed<N>[src]

impl<N: RealField> StructuralEq for Fixed<N>[src]

impl<N: RealField> StructuralPartialEq for Fixed<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Fixed<N> where
    N: RefUnwindSafe

impl<N> Send for Fixed<N>

impl<N> Sync for Fixed<N>

impl<N> Unpin for Fixed<N> where
    N: Unpin

impl<N> UnwindSafe for Fixed<N> where
    N: UnwindSafe

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<!> for T[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<T> Scalar for T where
    T: Copy + PartialEq<T> + Debug + Any
[src]

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.