pub struct Affinity<S, A, B, M>where
S: Field,
A: AffineSpace<S>,
B: AffineSpace<S>,
M: LinearMap<S, A::Translation, B::Translation>,{
pub linear_iso: LinearIso<S, A::Translation, B::Translation, M>,
pub translation: B::Translation,
}Expand description
Affine isomorphism
Fields§
§linear_iso: LinearIso<S, A::Translation, B::Translation, M>§translation: B::TranslationImplementations§
Source§impl<S, A, B, M> Affinity<S, A, B, M>where
M: LinearMap<S, A::Translation, B::Translation>,
A: AffineSpace<S>,
B: AffineSpace<S>,
S: Field,
impl<S, A, B, M> Affinity<S, A, B, M>where
M: LinearMap<S, A::Translation, B::Translation>,
A: AffineSpace<S>,
B: AffineSpace<S>,
S: Field,
pub const fn new( linear_iso: LinearIso<S, A::Translation, B::Translation, M>, translation: B::Translation, ) -> Self
pub fn mat(self) -> M
pub fn map(self, point: A) -> B
pub fn transform(self, translation: A::Translation) -> B::Translation
Trait Implementations§
Source§impl<S, A, B, M> Clone for Affinity<S, A, B, M>where
S: Field + Clone,
A: AffineSpace<S> + Clone,
B: AffineSpace<S> + Clone,
M: LinearMap<S, A::Translation, B::Translation> + Clone,
A::Translation: Clone,
B::Translation: Clone,
impl<S, A, B, M> Clone for Affinity<S, A, B, M>where
S: Field + Clone,
A: AffineSpace<S> + Clone,
B: AffineSpace<S> + Clone,
M: LinearMap<S, A::Translation, B::Translation> + Clone,
A::Translation: Clone,
B::Translation: Clone,
Source§impl<S, A, B, M> Debug for Affinity<S, A, B, M>where
S: Field + Debug,
A: AffineSpace<S> + Debug,
B: AffineSpace<S> + Debug,
M: LinearMap<S, A::Translation, B::Translation> + Debug,
A::Translation: Debug,
B::Translation: Debug,
impl<S, A, B, M> Debug for Affinity<S, A, B, M>where
S: Field + Debug,
A: AffineSpace<S> + Debug,
B: AffineSpace<S> + Debug,
M: LinearMap<S, A::Translation, B::Translation> + Debug,
A::Translation: Debug,
B::Translation: Debug,
Source§impl<S, A, B, M> Default for Affinity<S, A, B, M>where
S: Field + Default,
A: AffineSpace<S> + Default,
B: AffineSpace<S> + Default,
M: LinearMap<S, A::Translation, B::Translation> + Default,
A::Translation: Default,
B::Translation: Default,
impl<S, A, B, M> Default for Affinity<S, A, B, M>where
S: Field + Default,
A: AffineSpace<S> + Default,
B: AffineSpace<S> + Default,
M: LinearMap<S, A::Translation, B::Translation> + Default,
A::Translation: Default,
B::Translation: Default,
Source§impl<S, A, B, M> Display for Affinity<S, A, B, M>where
S: Field,
A: AffineSpace<S>,
B: AffineSpace<S>,
M: LinearMap<S, A::Translation, B::Translation>,
LinearIso<S, A::Translation, B::Translation, M>: Display,
B::Translation: Display,
impl<S, A, B, M> Display for Affinity<S, A, B, M>where
S: Field,
A: AffineSpace<S>,
B: AffineSpace<S>,
M: LinearMap<S, A::Translation, B::Translation>,
LinearIso<S, A::Translation, B::Translation, M>: Display,
B::Translation: Display,
Source§impl<S, A, B, M> PartialEq for Affinity<S, A, B, M>where
S: Field + PartialEq,
A: AffineSpace<S> + PartialEq,
B: AffineSpace<S> + PartialEq,
M: LinearMap<S, A::Translation, B::Translation> + PartialEq,
A::Translation: PartialEq,
B::Translation: PartialEq,
impl<S, A, B, M> PartialEq for Affinity<S, A, B, M>where
S: Field + PartialEq,
A: AffineSpace<S> + PartialEq,
B: AffineSpace<S> + PartialEq,
M: LinearMap<S, A::Translation, B::Translation> + PartialEq,
A::Translation: PartialEq,
B::Translation: PartialEq,
impl<S, A, B, M> Copy for Affinity<S, A, B, M>where
S: Field + Copy,
A: AffineSpace<S> + Copy,
B: AffineSpace<S> + Copy,
M: LinearMap<S, A::Translation, B::Translation> + Copy,
A::Translation: Copy,
B::Translation: Copy,
impl<S, A, B, M> Eq for Affinity<S, A, B, M>where
S: Field + Eq,
A: AffineSpace<S> + Eq,
B: AffineSpace<S> + Eq,
M: LinearMap<S, A::Translation, B::Translation> + Eq,
A::Translation: Eq,
B::Translation: Eq,
impl<S, A, B, M> StructuralPartialEq for Affinity<S, A, B, M>where
S: Field,
A: AffineSpace<S>,
B: AffineSpace<S>,
M: LinearMap<S, A::Translation, B::Translation>,
Auto Trait Implementations§
impl<S, A, B, M> Freeze for Affinity<S, A, B, M>
impl<S, A, B, M> RefUnwindSafe for Affinity<S, A, B, M>where
<B as AffineSpace<S>>::Translation: RefUnwindSafe,
M: RefUnwindSafe,
S: RefUnwindSafe,
<A as AffineSpace<S>>::Translation: RefUnwindSafe,
impl<S, A, B, M> Send for Affinity<S, A, B, M>where
<B as AffineSpace<S>>::Translation: Send,
M: Send,
S: Send,
<A as AffineSpace<S>>::Translation: Send,
impl<S, A, B, M> Sync for Affinity<S, A, B, M>where
<B as AffineSpace<S>>::Translation: Sync,
M: Sync,
S: Sync,
<A as AffineSpace<S>>::Translation: Sync,
impl<S, A, B, M> Unpin for Affinity<S, A, B, M>where
<B as AffineSpace<S>>::Translation: Unpin,
M: Unpin,
S: Unpin,
<A as AffineSpace<S>>::Translation: Unpin,
impl<S, A, B, M> UnwindSafe for Affinity<S, A, B, M>where
<B as AffineSpace<S>>::Translation: UnwindSafe,
M: UnwindSafe,
S: UnwindSafe,
<A as AffineSpace<S>>::Translation: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.