#[repr(u32)]pub enum MeshIndexFormat {
KUint16 = 1,
KUint32 = 2,
}
Expand description
Set a mesh’s indices and vertices.
mesh_id
refs the Mesh to be updated.
index_buffer_id
refs a Buffer that contains the mesh indices.
index_format
defines how the index buffer data is to be interpreted.
index_offset
number of bytes from the start of the index Buffer.
index_count
number of indices.
vertex_buffer_id
refs a Buffer that contains the mesh vertices.
vertex_format
defines how the vertex buffer data is to be interpreted.
vertex_offset
number of bytes from the start of the vertex Buffer.
vertex_count
number of vertices.
bounding_box
must contain all vertices within the specified range.
The MeshVertexFormat defines which per-vertex attributes are provided by the mesh, and the size of each attribute (and therefore the size of each vertex). The attributes are ordered within the vertex in the same order that they appear within the MeshVertexFormat struct. For example, if the values are kVector3, kNone and kVector2, then:
- each vertex has a position and UV-coordinates, but no surface normal.
- the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
- the UV coords occupy bytes 12-19, since no surface normal is provided.
Variants§
Implementations§
Source§impl MeshIndexFormat
impl MeshIndexFormat
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl Clone for MeshIndexFormat
impl Clone for MeshIndexFormat
Source§fn clone(&self) -> MeshIndexFormat
fn clone(&self) -> MeshIndexFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MeshIndexFormat
impl Debug for MeshIndexFormat
Source§impl<D: ResourceDialect> Decode<MeshIndexFormat, D> for MeshIndexFormat
impl<D: ResourceDialect> Decode<MeshIndexFormat, D> for MeshIndexFormat
Source§impl<D: ResourceDialect> Encode<MeshIndexFormat, D> for MeshIndexFormat
impl<D: ResourceDialect> Encode<MeshIndexFormat, D> for MeshIndexFormat
Source§impl Hash for MeshIndexFormat
impl Hash for MeshIndexFormat
Source§impl Ord for MeshIndexFormat
impl Ord for MeshIndexFormat
Source§fn cmp(&self, other: &MeshIndexFormat) -> Ordering
fn cmp(&self, other: &MeshIndexFormat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MeshIndexFormat
impl PartialEq for MeshIndexFormat
Source§impl PartialOrd for MeshIndexFormat
impl PartialOrd for MeshIndexFormat
Source§impl TypeMarker for MeshIndexFormat
impl TypeMarker for MeshIndexFormat
Source§type Owned = MeshIndexFormat
type Owned = MeshIndexFormat
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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 moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
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 MeshIndexFormat
impl ValueTypeMarker for MeshIndexFormat
Source§type Borrowed<'a> = MeshIndexFormat
type Borrowed<'a> = MeshIndexFormat
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for MeshIndexFormat
impl Eq for MeshIndexFormat
impl StructuralPartialEq for MeshIndexFormat
Auto Trait Implementations§
impl Freeze for MeshIndexFormat
impl RefUnwindSafe for MeshIndexFormat
impl Send for MeshIndexFormat
impl Sync for MeshIndexFormat
impl Unpin for MeshIndexFormat
impl UnwindSafe for MeshIndexFormat
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
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)
clone_to_uninit
)