pub struct mat<T, const N: usize, const M: usize>(pub [vec<T, M>; N]);Expand description
Matrix data type.
Element type should be Scalar, then it can be used as device data type.
Tuple Fields§
§0: [vec<T, M>; N]Trait Implementations§
impl<T: Copy, const N: usize, const M: usize> Copy for mat<T, N, M>
Source§impl<T, const N: usize> DeviceRepr for mat<T, N, 2>where
T: Scalar,
impl<T, const N: usize> DeviceRepr for mat<T, N, 2>where
T: Scalar,
Source§type Repr = mat<<T as Scalar>::ScalarRepr, N, 2>
type Repr = mat<<T as Scalar>::ScalarRepr, N, 2>
A POD type that can represent same data with layout compatible with shaders.
It is
Self or another type with same data and manual padding.Source§type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 2>
type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 2>
A POD type with layout compatible with shaders.
This is the same as
Self::Repr but with tail padding up to Self::ALIGN.fn make_array_repr(&self) -> Self::ArrayRepr
Source§fn as_array_repr(&self) -> Self::ArrayRepr
fn as_array_repr(&self) -> Self::ArrayRepr
Construct a
Self::ArrayRepr from &self.Source§fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
Return byte representation of
ArrayRepr slice.Source§const ARRAY_SIZE: usize = _
const ARRAY_SIZE: usize = _
Size of array repr type.
Source§impl<T, const N: usize> DeviceRepr for mat<T, N, 3>where
T: Scalar,
impl<T, const N: usize> DeviceRepr for mat<T, N, 3>where
T: Scalar,
Source§type Repr = mat<<T as Scalar>::ScalarRepr, N, 4>
type Repr = mat<<T as Scalar>::ScalarRepr, N, 4>
A POD type that can represent same data with layout compatible with shaders.
It is
Self or another type with same data and manual padding.Source§type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 4>
type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 4>
A POD type with layout compatible with shaders.
This is the same as
Self::Repr but with tail padding up to Self::ALIGN.fn make_array_repr(&self) -> Self::ArrayRepr
Source§fn as_array_repr(&self) -> Self::ArrayRepr
fn as_array_repr(&self) -> Self::ArrayRepr
Construct a
Self::ArrayRepr from &self.Source§fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
Return byte representation of
ArrayRepr slice.Source§const ARRAY_SIZE: usize = _
const ARRAY_SIZE: usize = _
Size of array repr type.
Source§impl<T, const N: usize> DeviceRepr for mat<T, N, 4>where
T: Scalar,
impl<T, const N: usize> DeviceRepr for mat<T, N, 4>where
T: Scalar,
Source§type Repr = mat<<T as Scalar>::ScalarRepr, N, 4>
type Repr = mat<<T as Scalar>::ScalarRepr, N, 4>
A POD type that can represent same data with layout compatible with shaders.
It is
Self or another type with same data and manual padding.Source§type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 4>
type ArrayRepr = mat<<T as Scalar>::ScalarRepr, N, 4>
A POD type with layout compatible with shaders.
This is the same as
Self::Repr but with tail padding up to Self::ALIGN.fn make_array_repr(&self) -> Self::ArrayRepr
Source§fn as_array_repr(&self) -> Self::ArrayRepr
fn as_array_repr(&self) -> Self::ArrayRepr
Construct a
Self::ArrayRepr from &self.Source§fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
fn as_array_bytes(repr: &[Self::ArrayRepr]) -> &[u8] ⓘ
Return byte representation of
ArrayRepr slice.Source§const ARRAY_SIZE: usize = _
const ARRAY_SIZE: usize = _
Size of array repr type.
impl<T: Eq, const N: usize, const M: usize> Eq for mat<T, N, M>
Source§impl<T: PartialEq, const N: usize, const M: usize> PartialEq for mat<T, N, M>
impl<T: PartialEq, const N: usize, const M: usize> PartialEq for mat<T, N, M>
impl<T, const N: usize, const M: usize> Pod for mat<T, N, M>where
T: Pod,
impl<T: PartialEq, const N: usize, const M: usize> StructuralPartialEq for mat<T, N, M>
Source§impl<T, const M: usize> VertexAttributes for mat<T, 2, M>where
vec<T, M>: VertexAttributes,
impl<T, const M: usize> VertexAttributes for mat<T, 2, M>where
vec<T, M>: VertexAttributes,
const FORMAT: VertexFormat = <vec<T, M> as VertexAttributes>::FORMAT
const COUNT: VectorSize = VectorSize::Two
Source§impl<T, const M: usize> VertexAttributes for mat<T, 3, M>where
vec<T, M>: VertexAttributes,
impl<T, const M: usize> VertexAttributes for mat<T, 3, M>where
vec<T, M>: VertexAttributes,
const FORMAT: VertexFormat = <vec<T, M> as VertexAttributes>::FORMAT
const COUNT: VectorSize = VectorSize::Three
Source§impl<T, const M: usize> VertexAttributes for mat<T, 4, M>where
vec<T, M>: VertexAttributes,
impl<T, const M: usize> VertexAttributes for mat<T, 4, M>where
vec<T, M>: VertexAttributes,
const FORMAT: VertexFormat = <vec<T, M> as VertexAttributes>::FORMAT
const COUNT: VectorSize = VectorSize::Four
Auto Trait Implementations§
impl<T, const N: usize, const M: usize> Freeze for mat<T, N, M>where
T: Freeze,
impl<T, const N: usize, const M: usize> RefUnwindSafe for mat<T, N, M>where
T: RefUnwindSafe,
impl<T, const N: usize, const M: usize> Send for mat<T, N, M>where
T: Send,
impl<T, const N: usize, const M: usize> Sync for mat<T, N, M>where
T: Sync,
impl<T, const N: usize, const M: usize> Unpin for mat<T, N, M>where
T: Unpin,
impl<T, const N: usize, const M: usize> UnsafeUnpin for mat<T, N, M>where
T: UnsafeUnpin,
impl<T, const N: usize, const M: usize> UnwindSafe for mat<T, N, M>where
T: UnwindSafe,
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
impl<T> AutoDeviceRepr for Twhere
T: DeviceRepr<Repr = T, ArrayRepr = T> + Pod,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§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.Source§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.