`pub struct Frame<N: Copy + RealField> { /* private fields */ }`

## Expand description

Frame wrt camera eye and target.

## Implementations§

source§### impl<N: Copy + RealField> Frame<N>

### impl<N: Copy + RealField> Frame<N>

source#### pub fn look_at(target: Point3<N>, eye: &Point3<N>, up: &Vector3<N>) -> Self

#### pub fn look_at(target: Point3<N>, eye: &Point3<N>, up: &Vector3<N>) -> Self

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

source#### pub fn set_eye(&mut self, eye: &Point3<N>, up: &Vector3<N>)

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

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

source#### pub fn set_target(&mut self, pos: Point3<N>)

#### pub fn set_target(&mut self, pos: Point3<N>)

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

Allows to track a moving object.

source#### pub fn set_distance(&mut self, zat: N)

#### pub fn set_distance(&mut self, zat: N)

Sets distance between eye and target preserving target position.

source#### pub fn scale(&mut self, rat: N)

#### pub fn scale(&mut self, rat: N)

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

source#### pub fn local_scale_around(&mut self, rat: N, pos: &Point3<N>)

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

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

source#### pub fn scale_around(&mut self, rat: N, pos: &Point3<N>)

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

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

source#### pub fn local_slide(&mut self, vec: &Vector3<N>)

#### pub fn local_slide(&mut self, vec: &Vector3<N>)

Slides camera eye and target by vector in camera space.

source#### pub fn slide(&mut self, vec: &Vector3<N>)

#### pub fn slide(&mut self, vec: &Vector3<N>)

Slides camera eye and target by vector in world space.

source#### pub fn local_orbit(&mut self, rot: &UnitQuaternion<N>)

#### pub fn local_orbit(&mut self, rot: &UnitQuaternion<N>)

Orbits eye by rotation in camera space around target.

source#### pub fn local_orbit_around(&mut self, rot: &UnitQuaternion<N>, pos: &Point3<N>)

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

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

source#### pub fn orbit(&mut self, rot: &UnitQuaternion<N>)

#### pub fn orbit(&mut self, rot: &UnitQuaternion<N>)

Orbits eye by rotation in world space around target.

source#### pub fn orbit_around(&mut self, rot: &UnitQuaternion<N>, pos: &Point3<N>)

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

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

source#### pub fn look_around(&mut self, pitch: N, yaw: N, yaw_axis: &Unit<Vector3<N>>)

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

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.

source#### pub fn local_pitch_axis(&self) -> Unit<Vector3<N>>

#### pub fn local_pitch_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn local_yaw_axis(&self) -> Unit<Vector3<N>>

#### pub fn local_yaw_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn local_roll_axis(&self) -> Unit<Vector3<N>>

#### pub fn local_roll_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn pitch_axis(&self) -> Unit<Vector3<N>>

#### pub fn pitch_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn yaw_axis(&self) -> Unit<Vector3<N>>

#### pub fn yaw_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn roll_axis(&self) -> Unit<Vector3<N>>

#### pub fn roll_axis(&self) -> Unit<Vector3<N>>

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

source#### pub fn try_lerp_slerp(&self, other: &Self, t: N, epsilon: N) -> Option<Self>

#### pub fn try_lerp_slerp(&self, other: &Self, t: N, epsilon: N) -> Option<Self>

Attempts to interpolate between two frames using linear interpolation for the translation part, and spherical linear interpolation for the rotation part.

Returns `None`

if the angle between both rotations is 180 degrees (in which case the
interpolation is not well-defined).

##### §Arguments

`self`

: The initial frame to interpolate from.`other`

: The final frame to interpolate toward.`t`

: The interpolation parameter between 0 and 1.`epsilon`

: The value below which the sinus of the angle separating both quaternion must be to return`None`

.

source#### pub fn renormalize(&mut self) -> N

#### pub fn renormalize(&mut self) -> N

Renormalizes eye rotation and returns its norm.

source#### pub fn inverse_view(&self) -> Isometry3<N>

#### pub fn inverse_view(&self) -> Isometry3<N>

Inverse view transformation from world to camera space.

Uses less computations than `Self::view()`

`.inverse()`

.

## Trait Implementations§

source§### impl<N: Copy + RealField + AbsDiffEq> AbsDiffEq for Frame<N>

### impl<N: Copy + RealField + AbsDiffEq> AbsDiffEq for Frame<N>

source§#### fn default_epsilon() -> N::Epsilon

#### fn default_epsilon() -> N::Epsilon

source§#### fn abs_diff_eq(&self, other: &Self, epsilon: N::Epsilon) -> bool

#### fn abs_diff_eq(&self, other: &Self, epsilon: N::Epsilon) -> bool

source§#### fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

#### fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

`AbsDiffEq::abs_diff_eq`

.source§### impl<N: Copy + RealField> Archive for Frame<N>

Available on **crate feature **`rkyv`

only.

### impl<N: Copy + RealField> Archive for Frame<N>

**crate feature**only.

`rkyv`

source§### impl<'de, N> Deserialize<'de> for Frame<N>

### impl<'de, N> Deserialize<'de> for Frame<N>

source§#### fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,

#### fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,

source§### impl<De: Fallible + ?Sized, N: Copy + RealField> Deserialize<Frame<N>, De> for Frame<N>

Available on **crate feature **`rkyv`

only.

### impl<De: Fallible + ?Sized, N: Copy + RealField> Deserialize<Frame<N>, De> for Frame<N>

**crate feature**only.

`rkyv`

source§### impl<N: PartialEq + Copy + RealField> PartialEq for Frame<N>

### impl<N: PartialEq + Copy + RealField> PartialEq for Frame<N>

source§### impl<N: Copy + RealField + RelativeEq> RelativeEq for Frame<N>

### impl<N: Copy + RealField + RelativeEq> RelativeEq for Frame<N>

source§#### fn default_max_relative() -> N::Epsilon

#### fn default_max_relative() -> N::Epsilon

source§#### fn relative_eq(
&self,
other: &Self,
epsilon: N::Epsilon,
max_relative: N::Epsilon
) -> bool

#### fn relative_eq( &self, other: &Self, epsilon: N::Epsilon, max_relative: N::Epsilon ) -> bool

source§#### fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool

#### fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

`RelativeEq::relative_eq`

.source§### impl<Ser: Fallible + ?Sized, N: Copy + RealField> Serialize<Ser> for Frame<N>

Available on **crate feature **`rkyv`

only.

### impl<Ser: Fallible + ?Sized, N: Copy + RealField> Serialize<Ser> for Frame<N>

**crate feature**only.

`rkyv`

source§### impl<N: Copy + RealField + UlpsEq> UlpsEq for Frame<N>

### impl<N: Copy + RealField + UlpsEq> UlpsEq for Frame<N>

### impl<N: Copy + Copy + RealField> Copy for Frame<N>

### impl<N: Eq + Copy + RealField> Eq for Frame<N>

### impl<N: Copy + RealField> StructuralPartialEq for Frame<N>

## 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§

source§### impl<T> ArchivePointee for T

### impl<T> ArchivePointee for T

§#### type ArchivedMetadata = ()

#### type ArchivedMetadata = ()

source§#### fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata

#### fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

source§### impl<T> ArchiveUnsized for Twhere
T: Archive,

### impl<T> ArchiveUnsized for Twhere
T: Archive,

§#### type Archived = <T as Archive>::Archived

#### type Archived = <T as Archive>::Archived

`Archive`

, it may be unsized. Read more§#### type MetadataResolver = ()

#### type MetadataResolver = ()

source§#### unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)

#### unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )

source§### impl<T> BorrowMut<T> for Twhere
T: ?Sized,

### impl<T> BorrowMut<T> for Twhere
T: ?Sized,

source§#### fn borrow_mut(&mut self) -> &mut T

#### fn borrow_mut(&mut self) -> &mut T

source§### impl<F, W, T, D> Deserialize<With<T, W>, D> for F

### impl<F, W, T, D> Deserialize<With<T, W>, D> for F

source§### impl<T, S> SerializeUnsized<S> for T

### impl<T, S> SerializeUnsized<S> for T

source§### impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,

### impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,

source§#### fn to_subset(&self) -> Option<SS>

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

`self`

from the equivalent element of its
superset. Read moresource§#### fn is_in_subset(&self) -> bool

#### fn is_in_subset(&self) -> bool

`self`

is actually part of its subset `T`

(and can be converted to it).source§#### fn to_subset_unchecked(&self) -> SS

#### fn to_subset_unchecked(&self) -> SS

`self.to_subset`

but without any property checks. Always succeeds.source§#### fn from_subset(element: &SS) -> SP

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

`self`

to the equivalent element of its superset.