Struct Point4

Source
#[repr(C)]
pub struct Point4<S>(pub Vector4<S>);
Expand description

4D position

Tuple Fields§

§0: Vector4<S>

Implementations§

Source§

impl<S> Point4<S>

Source

pub fn numcast<T>(self) -> Option<Point4<T>>
where S: NumCast, T: NumCast,

Source§

impl<S> Point4<S>

Source

pub const fn new(x: S, y: S, z: S, w: S) -> Self

Trait Implementations§

Source§

impl<S> AbsDiffEq for Point4<S>
where S: AbsDiffEq, S::Epsilon: Copy,

Source§

type Epsilon = <S as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
Source§

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

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Source§

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

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<S> Add<&Vec4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the + operator.
Source§

fn add(self, displacement: &Vector4<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S> Add<&Vec4<S>> for Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the + operator.
Source§

fn add(self, displacement: &Vector4<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S> Add<Vec4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the + operator.
Source§

fn add(self, displacement: Vector4<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S> Add<Vec4<S>> for Point4<S>
where S: AdditiveGroup,

Source§

type Output = Point4<S>

The resulting type after applying the + operator.
Source§

fn add(self, displacement: Vector4<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S> AddAssign<&Vec4<S>> for Point4<S>
where S: AdditiveGroup + Copy,

Source§

fn add_assign(&mut self, displacement: &Vector4<S>)

Performs the += operation. Read more
Source§

impl<S> AddAssign<Vec4<S>> for Point4<S>
where S: AdditiveGroup,

Source§

fn add_assign(&mut self, displacement: Vector4<S>)

Performs the += operation. Read more
Source§

impl<S: Clone> Clone for Point4<S>

Source§

fn clone(&self) -> Point4<S>

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> Debug for Point4<S>

Source§

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

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

impl<S: Default> Default for Point4<S>

Source§

fn default() -> Point4<S>

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

impl<S> Display for Point4<S>
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> FixedPoint4<S> for Point4<S>
where S: Fixed,

Source§

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

Source§

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

Source§

impl<S> From<[S; 4]> for Point4<S>

Source§

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

Converts to this type from the input type.
Source§

impl<S, U> From<Point4<S>> for Position4<S, U>

Source§

fn from(point: Point4<S>) -> Self

Converts to this type from the input type.
Source§

impl<S> From<Vec4<S>> for Point4<S>

Source§

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

Converts to this type from the input type.
Source§

impl<S> GroupAction<Point4<S>> for Vector4<S>
where S: AdditiveGroup,

Source§

fn action(self, point: Point4<S>) -> Point4<S>

Source§

impl<S: Neg<Output = S>> Neg for Point4<S>

Source§

type Output = Point4<S>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Point4<S>

Performs the unary - operation. Read more
Source§

impl<S: PartialEq> PartialEq for Point4<S>

Source§

fn eq(&self, other: &Point4<S>) -> 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> Point<Vec4<S>> for Point4<S>
where S: Ring,

Source§

fn to_vector(self) -> Vector4<S>

Source§

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

Source§

fn origin() -> Self

Source§

impl<S> RelativeEq for Point4<S>
where S: RelativeEq, S::Epsilon: Copy,

Source§

fn default_max_relative() -> Self::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

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

A test for equality that uses a relative comparison if the values are far apart.
Source§

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

The inverse of RelativeEq::relative_eq.
Source§

impl<S> Sub<&Point4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Vec4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Point4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub<&Point4<S>> for Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Vec4<S>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<S> Sub<&Vec4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, displacement: &Vector4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub<&Vec4<S>> for Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, displacement: &Vector4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub<Point4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Vec4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Point4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub<Vec4<S>> for &Point4<S>
where S: AdditiveGroup + Copy,

Source§

type Output = Point4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, displacement: Vector4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub<Vec4<S>> for Point4<S>
where S: AdditiveGroup,

Source§

type Output = Point4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, displacement: Vector4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S> Sub for Point4<S>
where S: AdditiveGroup,

Source§

type Output = Vec4<S>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<S> SubAssign<&Vec4<S>> for Point4<S>
where S: AdditiveGroup + Copy,

Source§

fn sub_assign(&mut self, displacement: &Vector4<S>)

Performs the -= operation. Read more
Source§

impl<S> SubAssign<Vec4<S>> for Point4<S>
where S: AdditiveGroup,

Source§

fn sub_assign(&mut self, displacement: Vector4<S>)

Performs the -= operation. Read more
Source§

impl<S> UlpsEq for Point4<S>
where S: UlpsEq, S::Epsilon: Copy,

Source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
Source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
Source§

impl<S: Copy> Copy for Point4<S>

Source§

impl<S: Eq> Eq for Point4<S>

Source§

impl<S> StructuralPartialEq for Point4<S>

Auto Trait Implementations§

§

impl<S> Freeze for Point4<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Point4<S>
where S: RefUnwindSafe,

§

impl<S> Send for Point4<S>
where S: Send,

§

impl<S> Sync for Point4<S>
where S: Sync,

§

impl<S> Unpin for Point4<S>
where S: Unpin,

§

impl<S> UnwindSafe for Point4<S>
where S: UnwindSafe,

Blanket Implementations§

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