pub struct Transform {
pub matrix: [f32; 16],
}
Expand description
A projective transformation of a 3D cartesian space.
A transform consists of a 4x4 matrix that operates in homogeneous
coordinates. For example, a point located at (x, y, z) in the cartesian
space is transformed by M
to a point located at (x’/w’, y’/w’, z’/w’),
where (x', y', z', w') = M (x, y, z, 1)
.
Fields§
§matrix: [f32; 16]
The entries in the transformation matrix in row major order.
Specifically, if the matrix is as follows:
a b c d
e f g h
i j k l
m n o p
then the entries in this array are
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Transform, D> for Transform
impl<D: ResourceDialect> Decode<Transform, D> for Transform
Source§impl PartialOrd for Transform
impl PartialOrd for Transform
Source§impl TypeMarker for Transform
impl TypeMarker for Transform
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Transform
impl ValueTypeMarker for Transform
impl Copy for Transform
impl Persistable for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)