Struct Displacement4

Source
#[repr(C)]
pub struct Displacement4<S, U>(pub Vector4<S>, _);
Expand description

4D linear displacement vector coordinates tagged with unit

Tuple Fields§

§0: Vector4<S>

Trait Implementations§

Source§

impl<S, U> Add<&Displacement4<S, U>> for Displacement4<S, U>
where Vector4<S>: Add<Output = Vector4<S>>, S: Copy,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the + operator.
Source§

fn add(self, other: &Self) -> Self

Performs the + operation. Read more
Source§

impl<S, U> Add for Displacement4<S, U>
where Vector4<S>: Add<Output = Vector4<S>>,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl<S, U> AddAssign for Displacement4<S, U>
where Vector4<S>: AddAssign,

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl<S, U> Clone for Displacement4<S, U>
where S: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug, U: Debug> Debug for Displacement4<S, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Default, U: Default> Default for Displacement4<S, U>

Source§

fn default() -> Displacement4<S, U>

Returns the “default value” for a type. Read more
Source§

impl<S, U> Display for Displacement4<S, U>
where Vector4<S>: Display,

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, U> Div<S> for Displacement4<S, U>
where Vector4<S>: Div<S, Output = Vector4<S>>,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the / operator.
Source§

fn div(self, scalar: S) -> Self

Performs the / operation. Read more
Source§

impl<S, U> Dot<S> for Displacement4<S, U>
where Vector4<S>: Dot<S>, S: Ring,

Source§

fn dot(self, other: Self) -> S

Source§

fn self_dot(self) -> S

Self dot product
Source§

impl<S, U> FixedVector4<S> for Displacement4<S, U>
where S: Fixed,

Source§

fn from_num<N: ToFixed>(num: Vector4<N>) -> Self

Source§

fn wrapping_from_num<N: ToFixed>(num: Vector4<N>) -> Self

Source§

impl<S, U> From<[S; 4]> for Displacement4<S, U>

Source§

fn from(array: [S; 4]) -> Self

Converts to this type from the input type.
Source§

impl<S, U> From<Displacement3<S, U>> for Displacement4<S, U>
where S: Field,

Source§

fn from(transform: Displacement3<S, U>) -> Self

Converts to this type from the input type.
Source§

impl<S, U> From<Vec4<S>> for Displacement4<S, U>

Source§

fn from(vector: Vector4<S>) -> Self

Converts to this type from the input type.
Source§

impl<S, U> Group for Displacement4<S, U>
where S: AdditiveGroup,

Source§

fn identity() -> Self

Source§

fn operation(a: Self, b: Self) -> Self

Source§

impl<S, U> GroupAction<Position4<S, U>> for Displacement4<S, U>
where S: AdditiveGroup,

Source§

fn action(self, position: Position4<S, U>) -> Position4<S, U>

Source§

impl<S, U> InnerProductSpace<S> for Displacement4<S, U>
where Vector4<S>: InnerProductSpace<S>, S: Field,

Source§

fn inner_product(self, other: Self) -> S

Source§

impl<S, U, V> LinearMap<S, Displacement4<S, U>, Displacement4<S, V>> for Transform4<S, U, V>
where S: Ring,

Source§

fn determinant(self) -> S

Source§

fn transpose(self) -> Self

Source§

impl<S, U> Module<S> for Displacement4<S, U>
where Vector4<S>: Module<S>, S: Ring,

Source§

type LinearEndo = Transform4<S, U, U>

Linear endomorphism represented by a square matrix type
Source§

impl<S, U, V> Mul<Displacement4<S, U>> for Transform4<S, U, V>
where S: Ring,

Source§

type Output = Displacement4<S, V>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Displacement4<S, U>) -> Displacement4<S, V>

Performs the * operation. Read more
Source§

impl<S, U> Mul<S> for Displacement4<S, U>
where Vector4<S>: Mul<S, Output = Vector4<S>>,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: S) -> Self

Performs the * operation. Read more
Source§

impl<S, U> Neg for Displacement4<S, U>
where Vector4<S>: Neg<Output = Vector4<S>>,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<S, U> PartialEq for Displacement4<S, U>
where Vector4<S>: PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, U> Point<Displacement4<S, U>> for Displacement4<S, U>
where S: Ring,

Source§

fn to_vector(self) -> Displacement4<S, U>

Source§

fn from_vector(displacement: Displacement4<S, U>) -> Self

Source§

fn origin() -> Self

Source§

impl<S, U> Point<Displacement4<S, U>> for Position4<S, U>
where S: Ring,

Source§

fn to_vector(self) -> Displacement4<S, U>

Source§

fn from_vector(displacement: Displacement4<S, U>) -> Self

Source§

fn origin() -> Self

Source§

impl<S, U> ProjectiveSpace<S, Displacement3<S, U>> for Displacement4<S, U>
where S: Field + Display,

Source§

fn homography<A>( affinity: Affinity<S, A, A, <A::Vector as Module<S>>::LinearEndo>, ) -> Projectivity<S, Displacement3<S, U>, Displacement3<S, U>, Self, Self, Self::LinearEndo>
where A: AffineSpace<S, Vector = Displacement3<S, U>>,

Construct an augmented matrix for the affinity
Source§

fn homogeneous<A>(point_or_vector: Either<A::Point, A::Vector>) -> Self
where A: AffineSpace<S, Vector = Displacement3<S, U>>, Displacement3<S, U>: GroupAction<A::Point>,

Return the projective completion (homogeneous coordinates) of the affine point or vector
Source§

impl<S, U> Sub<&Displacement4<S, U>> for Displacement4<S, U>
where Vector4<S>: Sub<Output = Vector4<S>>, S: Copy,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Self) -> Self

Performs the - operation. Read more
Source§

impl<S, U> Sub for Displacement4<S, U>
where Vector4<S>: Sub<Output = Vector4<S>>,

Source§

type Output = Displacement4<S, U>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
Source§

impl<S, U> SubAssign for Displacement4<S, U>
where Vector4<S>: SubAssign,

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl<S, U> VectorSpace<S> for Displacement4<S, U>
where Vector4<S>: VectorSpace<S>, S: Field,

Source§

fn map<F>(self, f: F) -> Self
where F: FnMut(S) -> S,

Source§

fn sigvec(self) -> Self
where S: SignedExt,

Map signum_or_zero over each element of the given vector
Source§

impl<S, U> Zero for Displacement4<S, U>
where S: AdditiveGroup,

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<S, U> AdditiveGroup for Displacement4<S, U>
where Vector4<S>: AdditiveGroup, S: Ring,

Source§

impl<S, U> AdditiveMonoid for Displacement4<S, U>
where Vector4<S>: AdditiveGroup, S: Ring,

Source§

impl<S, U> Copy for Displacement4<S, U>
where S: Copy,

Source§

impl<S: Eq, U: Eq> Eq for Displacement4<S, U>

Auto Trait Implementations§

§

impl<S, U> Freeze for Displacement4<S, U>
where S: Freeze,

§

impl<S, U> RefUnwindSafe for Displacement4<S, U>

§

impl<S, U> Send for Displacement4<S, U>
where S: Send, U: Send,

§

impl<S, U> Sync for Displacement4<S, U>
where S: Sync, U: Sync,

§

impl<S, U> Unpin for Displacement4<S, U>
where S: Unpin, U: Unpin,

§

impl<S, U> UnwindSafe for Displacement4<S, U>
where S: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

Source§

impl<S, V> AffineSpace<S> for V
where S: Field, V: VectorSpace<S> + GroupAction<V> + Point<V>,

Source§

type Point = V

Source§

type Vector = V

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<G> GroupAction<G> for G
where G: Group,

Source§

fn action(self, g: G) -> G

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<V, S> MetricSpace<S> for V
where V: NormedVectorSpace<S>, S: Field,

Source§

fn distance_squared(self, other: V) -> S

Source§

fn distance(self, other: Self) -> S
where S: Sqrt,

Source§

impl<V, S> NormedVectorSpace<S> for V
where V: InnerProductSpace<S>, S: Field,

Source§

fn norm_squared(self) -> S

Source§

fn norm(self) -> S
where S: Sqrt,

Source§

fn normalize(self) -> Self
where S: Sqrt,

Source§

fn unit_sigvec(self) -> Self
where S: SignedExt + Sqrt,

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> MaybeSerDes for T