#[repr(C)]pub struct Vector4Data<T> {
pub a: T,
pub b: T,
pub c: T,
pub d: T,
}
Expand description
A four-dimensional vector, Quaternion, etc.
Fields§
§a: T
First vector component.
In quaternions, this resembles the x
axis.
b: T
Second vector component.
In quaternions, this resembles the y
axis.
c: T
Third vector component.
In quaternions, this resembles the z
axis.
d: T
Third vector component.
In quaternions, this resembles the d
axis.
Implementations§
Source§impl<T> Vector4Data<T>
impl<T> Vector4Data<T>
Source§impl<T> Vector4Data<T>
impl<T> Vector4Data<T>
Sourcepub const fn new(a: T, b: T, c: T, d: T) -> Self
pub const fn new(a: T, b: T, c: T, d: T) -> Self
Initializes a new Vector4Data
instance.
Trait Implementations§
Source§impl AsMut<Vector4Data<f32>> for OrientationQuaternionF32
impl AsMut<Vector4Data<f32>> for OrientationQuaternionF32
Source§fn as_mut(&mut self) -> &mut Vector4Data<f32>
fn as_mut(&mut self) -> &mut Vector4Data<f32>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<Vector4Data<f32>> for OrientationQuaternionF32
impl AsRef<Vector4Data<f32>> for OrientationQuaternionF32
Source§fn as_ref(&self) -> &Vector4Data<f32>
fn as_ref(&self) -> &Vector4Data<f32>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'__de, T> BorrowDecode<'__de> for Vector4Data<T>where
T: BorrowDecode<'__de>,
impl<'__de, T> BorrowDecode<'__de> for Vector4Data<T>where
T: BorrowDecode<'__de>,
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<T: Clone> Clone for Vector4Data<T>
impl<T: Clone> Clone for Vector4Data<T>
Source§fn clone(&self) -> Vector4Data<T>
fn clone(&self) -> Vector4Data<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for Vector4Data<T>
impl<T: Debug> Debug for Vector4Data<T>
Source§impl<T> Decode for Vector4Data<T>where
T: Decode,
impl<T> Decode for Vector4Data<T>where
T: Decode,
Source§impl<T: Default> Default for Vector4Data<T>
impl<T: Default> Default for Vector4Data<T>
Source§fn default() -> Vector4Data<T>
fn default() -> Vector4Data<T>
Returns the “default value” for a type. Read more
Source§impl<T> Encode for Vector4Data<T>where
T: Encode,
impl<T> Encode for Vector4Data<T>where
T: Encode,
Source§impl<T> Format for Vector4Data<T>where
T: Format,
impl<T> Format for Vector4Data<T>where
T: Format,
Source§impl<T> From<(T, T, T, T)> for Vector4Data<T>
impl<T> From<(T, T, T, T)> for Vector4Data<T>
Source§fn from(value: (T, T, T, T)) -> Self
fn from(value: (T, T, T, T)) -> Self
Converts to this type from the input type.
Source§impl From<OrientationQuaternionF32> for Vector4Data<f32>
impl From<OrientationQuaternionF32> for Vector4Data<f32>
Source§fn from(value: OrientationQuaternionF32) -> Vector4Data<f32>
fn from(value: OrientationQuaternionF32) -> Vector4Data<f32>
Converts to this type from the input type.
Source§impl From<Quaternion> for Vector4Data<f32>
Available on crate feature quaternion
only.
impl From<Quaternion> for Vector4Data<f32>
Available on crate feature
quaternion
only.Source§fn from(value: Quaternion) -> Self
fn from(value: Quaternion) -> Self
Converts to this type from the input type.
Source§impl<T> From<Vector4Data<T>> for [T; 4]
impl<T> From<Vector4Data<T>> for [T; 4]
Source§fn from(value: Vector4Data<T>) -> Self
fn from(value: Vector4Data<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<Vector4Data<T>> for (T, T, T, T)
impl<T> From<Vector4Data<T>> for (T, T, T, T)
Source§fn from(value: Vector4Data<T>) -> Self
fn from(value: Vector4Data<T>) -> Self
Converts to this type from the input type.
Source§impl From<Vector4Data<f32>> for OrientationQuaternionF32
impl From<Vector4Data<f32>> for OrientationQuaternionF32
Source§fn from(value: Vector4Data<f32>) -> OrientationQuaternionF32
fn from(value: Vector4Data<f32>) -> OrientationQuaternionF32
Converts to this type from the input type.
Source§impl From<Vector4Data<f32>> for Quaternion
Available on crate feature quaternion
only.
impl From<Vector4Data<f32>> for Quaternion
Available on crate feature
quaternion
only.Source§fn from(value: Vector4Data<f32>) -> Self
fn from(value: Vector4Data<f32>) -> Self
Converts to this type from the input type.
Source§impl<T: Hash> Hash for Vector4Data<T>
impl<T: Hash> Hash for Vector4Data<T>
Source§impl<T> Index<usize> for Vector4Data<T>
impl<T> Index<usize> for Vector4Data<T>
Source§impl<T> IndexMut<usize> for Vector4Data<T>
impl<T> IndexMut<usize> for Vector4Data<T>
Source§impl<T: Ord> Ord for Vector4Data<T>
impl<T: Ord> Ord for Vector4Data<T>
Source§fn cmp(&self, other: &Vector4Data<T>) -> Ordering
fn cmp(&self, other: &Vector4Data<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for Vector4Data<T>
impl<T: PartialEq> PartialEq for Vector4Data<T>
Source§impl<T: PartialOrd> PartialOrd for Vector4Data<T>
impl<T: PartialOrd> PartialOrd for Vector4Data<T>
impl<T: Copy> Copy for Vector4Data<T>
impl<T: Eq> Eq for Vector4Data<T>
impl<T> StructuralPartialEq for Vector4Data<T>
Auto Trait Implementations§
impl<T> Freeze for Vector4Data<T>where
T: Freeze,
impl<T> RefUnwindSafe for Vector4Data<T>where
T: RefUnwindSafe,
impl<T> Send for Vector4Data<T>where
T: Send,
impl<T> Sync for Vector4Data<T>where
T: Sync,
impl<T> Unpin for Vector4Data<T>where
T: Unpin,
impl<T> UnwindSafe for Vector4Data<T>where
T: 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