Deprecate to_pnt
, as_pnt
and VecAsPnt
.
Those are meaningless. Use `na::orig() + the_vector` instead.
This commit is contained in:
parent
276bf3f999
commit
e2fc8aa764
@ -332,7 +332,7 @@ impl<N: Num + Clone> UnitQuatMulRhs<N, Vec3<N>> for Vec3<N> {
|
||||
impl<N: Num + Clone> UnitQuatMulRhs<N, Pnt3<N>> for Pnt3<N> {
|
||||
#[inline]
|
||||
fn binop(left: &UnitQuat<N>, right: &Pnt3<N>) -> Pnt3<N> {
|
||||
(left * *right.as_vec()).to_pnt()
|
||||
::orig::<Pnt3<N>>() + *left * *right.as_vec()
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ impl<N: Num + Clone> Vec3MulRhs<N, Vec3<N>> for UnitQuat<N> {
|
||||
impl<N: Num + Clone> Pnt3MulRhs<N, Pnt3<N>> for UnitQuat<N> {
|
||||
#[inline]
|
||||
fn binop(left: &Pnt3<N>, right: &UnitQuat<N>) -> Pnt3<N> {
|
||||
(left.as_vec() * *right).to_pnt()
|
||||
::orig::<Pnt3<N>>() + *left.as_vec() * *right
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -686,6 +686,7 @@ macro_rules! transform_impl(
|
||||
macro_rules! vec_as_pnt_impl(
|
||||
($tv: ident, $t: ident, $comp0: ident $(,$compN: ident)*) => (
|
||||
impl<N> $tv<N> {
|
||||
#[deprecated = "use `na::orig() + this_vector` instead."]
|
||||
#[inline]
|
||||
pub fn to_pnt(self) -> $t<N> {
|
||||
$t::new(
|
||||
@ -694,6 +695,7 @@ macro_rules! vec_as_pnt_impl(
|
||||
)
|
||||
}
|
||||
|
||||
#[deprecated = "use `&(na::orig() + *this_vector)` instead."]
|
||||
#[inline]
|
||||
pub fn as_pnt<'a>(&'a self) -> &'a $t<N> {
|
||||
unsafe {
|
||||
|
@ -146,6 +146,7 @@ pub trait IterableMut<N> {
|
||||
* Vec related traits.
|
||||
*/
|
||||
/// Trait that relates a point of an affine space to a vector of the associated vector space.
|
||||
#[deprecated = "This will be removed in the future. Use point + vector operations instead."]
|
||||
pub trait VecAsPnt<P> {
|
||||
/// Converts this point to its associated vector.
|
||||
fn to_pnt(self) -> P;
|
||||
|
Loading…
Reference in New Issue
Block a user