pub struct Col4(/* private fields */);Expand description
A column of a 4x4 matrix.
Implementations§
source§impl Col4
impl Col4
sourcepub const fn to_vector4(&self) -> Vector4
pub const fn to_vector4(&self) -> Vector4
Converts the column into a 4D owning vector.
Methods from Deref<Target = StridedSlice<f32, 4>>§
sourcepub fn as_ptr(&self) -> *const T
pub fn as_ptr(&self) -> *const T
Returns a raw pointer to the slice’s buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it will end up pointing to garbage.
The caller must also ensure that the memory the pointer (non-transitively) points to
is never written to (except inside an UnsafeCell) using this pointer or any pointer
derived from it. If you need to mutate the contents of the slice, use [as_mut_ptr].
Modifying the container referenced by this slice may cause its buffer to be reallocated, which would also make any pointers to it invalid.
sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Returns an unsafe mutable pointer to the slice’s buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it will end up pointing to garbage.
Modifying the container referenced by this slice may cause its buffer to be reallocated, which would also make any pointers to it invalid.
sourcepub fn first(&self) -> Option<&T>
pub fn first(&self) -> Option<&T>
Returns a reference to the first element of the slice, or None if it
is empty.
sourcepub fn first_mut(&mut self) -> Option<&mut T>
pub fn first_mut(&mut self) -> Option<&mut T>
Returns a mutable pointer to the first element of the slice, or None if
it is empty.
sourcepub fn last(&self) -> Option<&T>
pub fn last(&self) -> Option<&T>
Returns a reference to the last item in the slice, or None if it is
empty.
sourcepub fn last_mut(&mut self) -> Option<&mut T>
pub fn last_mut(&mut self) -> Option<&mut T>
Returns a mutable pointer to the last item in the slice.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>
Returns a mutable iterator over the slice.