Retain new_observer_frame as a deprecated wrapper function

This commit is contained in:
Gedl 2019-01-17 10:17:00 +01:00
parent 3fdcf5329d
commit 59b0709fcf
5 changed files with 45 additions and 0 deletions

View File

@ -134,6 +134,12 @@ impl<N: Real> Matrix4<N> {
IsometryMatrix3::face_towards(eye, target, up).to_homogeneous() IsometryMatrix3::face_towards(eye, target, up).to_homogeneous()
} }
/// Deprecated: Use [Matrix4::face_towards] instead.
#[deprecated(note="renamed to `face_towards`")]
pub fn new_observer_frame(eye: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Self {
Matrix4::face_towards(eye, target, up)
}
/// Builds a right-handed look-at view matrix. /// Builds a right-handed look-at view matrix.
#[inline] #[inline]
pub fn look_at_rh(eye: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Self { pub fn look_at_rh(eye: &Point3<N>, target: &Point3<N>, up: &Vector3<N>) -> Self {

View File

@ -233,6 +233,15 @@ macro_rules! isometry_construction_impl(
$RotId::face_towards(&(target - eye), up)) $RotId::face_towards(&(target - eye), up))
} }
/// Deprecated: Use [Isometry::face_towards] instead.
#[deprecated(note="renamed to `face_towards`")]
pub fn new_observer_frame(eye: &Point3<N>,
target: &Point3<N>,
up: &Vector3<N>)
-> Self {
Self::face_towards(eye, target, up)
}
/// Builds a right-handed look-at view matrix. /// Builds a right-handed look-at view matrix.
/// ///
/// It maps the view direction `target - eye` to the **negative** `z` axis to and the `eye` to the origin. /// It maps the view direction `target - eye` to the **negative** `z` axis to and the `eye` to the origin.

View File

@ -464,6 +464,16 @@ impl<N: Real> UnitQuaternion<N> {
Self::from_rotation_matrix(&Rotation::<N, U3>::face_towards(dir, up)) Self::from_rotation_matrix(&Rotation::<N, U3>::face_towards(dir, up))
} }
/// Deprecated: Use [UnitQuaternion::face_towards] instead.
#[deprecated(note="renamed to `face_towards`")]
pub fn new_observer_frames<SB, SC>(dir: &Vector<N, U3, SB>, up: &Vector<N, U3, SC>) -> Self
where
SB: Storage<N, U3>,
SC: Storage<N, U3>,
{
Self::face_towards(dir, up)
}
/// Builds a right-handed look-at view matrix without translation. /// Builds a right-handed look-at view matrix without translation.
/// ///
/// It maps the view direction `dir` to the **negative** `z` axis. /// It maps the view direction `dir` to the **negative** `z` axis.

View File

@ -427,6 +427,16 @@ impl<N: Real> Rotation3<N> {
)) ))
} }
/// Deprecated: Use [Rotation3::face_towards] instead.
#[deprecated(note="renamed to `face_towards`")]
pub fn new_observer_frames<SB, SC>(dir: &Vector<N, U3, SB>, up: &Vector<N, U3, SC>) -> Self
where
SB: Storage<N, U3>,
SC: Storage<N, U3>,
{
Self::face_towards(dir, up)
}
/// Builds a right-handed look-at view matrix without translation. /// Builds a right-handed look-at view matrix without translation.
/// ///
/// It maps the view direction `dir` to the **negative** `z` axis. /// It maps the view direction `dir` to the **negative** `z` axis.

View File

@ -253,6 +253,16 @@ macro_rules! similarity_construction_impl(
Self::from_isometry(Isometry::<_, U3, $Rot>::face_towards(eye, target, up), scaling) Self::from_isometry(Isometry::<_, U3, $Rot>::face_towards(eye, target, up), scaling)
} }
/// Deprecated: Use [SimilarityMatrix3::face_towards] instead.
#[deprecated(note="renamed to `face_towards`")]
pub fn new_observer_frames(eye: &Point3<N>,
target: &Point3<N>,
up: &Vector3<N>,
scaling: N)
-> Self {
Self::face_towards(eye, target, up, scaling)
}
/// Builds a right-handed look-at view matrix including scaling factor. /// Builds a right-handed look-at view matrix including scaling factor.
/// ///
/// This conforms to the common notion of right handed look-at matrix from the computer /// This conforms to the common notion of right handed look-at matrix from the computer