Struct trackball::Frame[][src]

pub struct Frame<N: RealField> { /* fields omitted */ }

Frame wrt camera eye and target.

Implementations

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

pub fn look_at(eye: &Point3<N>, at: &Point3<N>, up: &Vector3<N>) -> Self[src]

Sets eye position inclusive its roll attitude and target position in world space.

pub fn eye(&self) -> Point3<N>[src]

Eye position in world space.

pub fn set_eye(&mut self, eye: &Point3<N>, up: &Vector3<N>)[src]

Sets eye position inclusive its roll attitude in world space preserving target position.

pub fn target(&self) -> &Point3<N>[src]

Target position in world space.

pub fn set_target(&mut self, at: &Point3<N>)[src]

Sets target position in world space preserving eye position inclusive its roll attitude.

pub fn distance(&self) -> N[src]

Target distance from eye.

pub fn set_distance(&mut self, zat: N)[src]

Sets target distance from eye preserving target position.

pub fn scale(&mut self, rat: N)[src]

Scales target distance from eye by rat.

pub fn local_scale_at(&mut self, rat: N, pos: &Point3<N>)[src]

Scales target distance from eye by rat at pos in camera space.

pub fn scale_at(&mut self, rat: N, pos: &Point3<N>)[src]

Scales target distance from eye by rat at pos in world space.

pub fn local_slide(&mut self, vec: &Vector3<N>)[src]

Slides camera eye and target by vector in world space.

pub fn slide(&mut self, vec: &Vector3<N>)[src]

Slides camera eye and target by vector in world space.

pub fn local_orbit(&mut self, rot: &UnitQuaternion<N>)[src]

Orbit eye at target by rot in camera space.

pub fn local_orbit_at(&mut self, rot: &UnitQuaternion<N>, pos: &Point3<N>)[src]

Orbits eye by rot at pos in camera space.

pub fn orbit(&mut self, rot: &UnitQuaternion<N>)[src]

Orbit eye at target by rot in world space.

pub fn orbit_at(&mut self, rot: &UnitQuaternion<N>, pos: &Point3<N>)[src]

Orbits eye by rot at pos in world space.

pub fn local_pitch_axis(&self) -> Unit<Vector3<N>>[src]

Positive x-axis in camera space pointing from left to right.

pub fn local_yaw_axis(&self) -> Unit<Vector3<N>>[src]

Positive y-axis in camera space pointing from bottom to top.

pub fn local_roll_axis(&self) -> Unit<Vector3<N>>[src]

Positive z-axis in camera space pointing from back to front.

pub fn pitch_axis(&self) -> Unit<Vector3<N>>[src]

Positive x-axis in world space pointing from left to right.

pub fn yaw_axis(&self) -> Unit<Vector3<N>>[src]

Positive y-axis in world space pointing from bottom to top.

pub fn roll_axis(&self) -> Unit<Vector3<N>>[src]

Positive z-axis in world space pointing from back to front.

pub fn angles(&self) -> (N, N, N)[src]

Eye attitude via intrinsic (pitch, yaw, roll) angles, see Self::set_angles().

pub fn set_angles(&mut self, pitch: N, yaw: N, roll: N)[src]

Sets eye attitude via intrinsic angles.

Eye rotation occurs in the sense prescribed by the right-hand rule in the following order:

  1. roll about Self::roll_axis() within ±π,
  2. pitch about rolled Self::pitch_axis() within ±π,
  3. yaw about rolled and pitched Self::yaw_axis() within ±π/2.

pub fn view(&self) -> Isometry3<N>[src]

View transformation from world to camera space.

Trait Implementations

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

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

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

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

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

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

Auto Trait Implementations

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

impl<N> Send for Frame<N>

impl<N> Sync for Frame<N>

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

impl<N> UnwindSafe for Frame<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<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.