Struct trackball::Frame [−][src]
pub struct Frame<N: RealField> { /* fields omitted */ }
Frame wrt camera eye and target.
Implementations
impl<N: RealField> Frame<N>
[src]
impl<N: RealField> Frame<N>
[src]pub fn look_at(target: Point3<N>, eye: &Point3<N>, up: &Vector3<N>) -> Self
[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 set_eye(&mut self, eye: &Point3<N>, up: &Vector3<N>)
[src]
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 set_target(&mut self, target: Point3<N>)
[src]
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 set_distance(&mut self, zat: N)
[src]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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:
- roll about
Self::roll_axis()
within ±π, - pitch about rolled
Self::pitch_axis()
within ±π, - yaw about rolled and pitched
Self::yaw_axis()
within ±π/2.
Trait Implementations
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,
N: RefUnwindSafe,
impl<N> Send for Frame<N>
impl<N> Sync for Frame<N>
impl<N> Unpin for Frame<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Frame<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
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
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
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
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]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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