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(target: Point3<N>, eye: &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, target: Point3<N>)[src]

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

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

Distance between eye and target.

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

Sets distance between eye and target preserving target position.

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

Scales distance between eye and target by ratio preserving target position.

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

Scales distance between eye and point in camera space by ratio preserving target position.

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

Scales distance between eye and point in world space by ratio preserving target position.

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

Slides camera eye and target by vector in camera 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]

Orbits eye by rotation in camera space around target.

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

Orbits eye by rotation in camera space around point in camera space.

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

Orbits eye by rotation in world space around target.

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

Orbits eye by rotation in world space around point in world space.

pub fn look_around(&mut self, pitch: N, yaw: N, yaw_axis: &Unit<Vector3<N>>)[src]

Orbits target around eye by pitch and yaw preserving roll attitude aka first person view.

Use fixed Self::yaw_axis() by capturing it when entering first person view.

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]

fn clone(&self) -> Frame<N>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

Formats the value using the given formatter. Read more

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

fn eq(&self, other: &Frame<N>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Frame<N>) -> bool[src]

This method tests for !=.

impl<N: Eq + RealField> Eq 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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

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

pub fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).

pub fn to_subset_unchecked(&self) -> SS

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

pub fn from_subset(element: &SS) -> SP

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

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.