#[repr(C)]pub struct Position3<T: Copy> {
pub coords: [T; 3],
}Expand description
A 3D position stored as [T; 3], #[repr(C)] for zero-copy GPU upload.
For T = f32, this is 12 bytes with no padding and maps directly to
wgpu::VertexFormat::Float32x3.
Fields§
§coords: [T; 3]Implementations§
Trait Implementations§
Source§impl<T: PartialEq + Copy> PartialEq for Position3<T>
impl<T: PartialEq + Copy> PartialEq for Position3<T>
impl<T: Copy + Copy> Copy for Position3<T>
impl Pod for Position3<f16>
impl Pod for Position3<f32>
impl Pod for Position3<f64>
impl<T: Copy> StructuralPartialEq for Position3<T>
Auto Trait Implementations§
impl<T> Freeze for Position3<T>where
T: Freeze,
impl<T> RefUnwindSafe for Position3<T>where
T: RefUnwindSafe,
impl<T> Send for Position3<T>where
T: Send,
impl<T> Sync for Position3<T>where
T: Sync,
impl<T> Unpin for Position3<T>where
T: Unpin,
impl<T> UnsafeUnpin for Position3<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Position3<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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.