pub struct PrimitiveRef<'a> { /* private fields */ }Expand description
Stable reference to a primitive in the lossless document.
Implementations§
Source§impl<'a> PrimitiveRef<'a>
impl<'a> PrimitiveRef<'a>
Sourcepub fn mesh_index(self) -> MeshIndex
pub fn mesh_index(self) -> MeshIndex
Returns the mesh containing this primitive.
Sourcepub fn primitive_index(self) -> usize
pub fn primitive_index(self) -> usize
Returns the primitive’s zero-based position within its mesh.
Sourcepub fn attributes(self) -> Option<&'a [(String, Value)]>
pub fn attributes(self) -> Option<&'a [(String, Value)]>
Returns the primitive attribute map.
Sourcepub fn attribute_indices(
self,
) -> impl Iterator<Item = (&'a str, AccessorIndex)> + 'a
pub fn attribute_indices( self, ) -> impl Iterator<Item = (&'a str, AccessorIndex)> + 'a
Iterates over named primitive attribute accessor indexes.
Sourcepub fn indices(self) -> Option<AccessorIndex>
pub fn indices(self) -> Option<AccessorIndex>
Returns the optional index accessor.
Sourcepub fn material(self) -> Option<MaterialIndex>
pub fn material(self) -> Option<MaterialIndex>
Returns the optional material index.
Sourcepub fn morph_targets(self) -> impl Iterator<Item = &'a [(String, Value)]> + 'a
pub fn morph_targets(self) -> impl Iterator<Item = &'a [(String, Value)]> + 'a
Iterates over morph-target attribute maps.
Trait Implementations§
Source§impl<'a> Clone for PrimitiveRef<'a>
impl<'a> Clone for PrimitiveRef<'a>
Source§fn clone(&self) -> PrimitiveRef<'a>
fn clone(&self) -> PrimitiveRef<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for PrimitiveRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for PrimitiveRef<'a>
impl<'a> RefUnwindSafe for PrimitiveRef<'a>
impl<'a> Send for PrimitiveRef<'a>
impl<'a> Sync for PrimitiveRef<'a>
impl<'a> Unpin for PrimitiveRef<'a>
impl<'a> UnsafeUnpin for PrimitiveRef<'a>
impl<'a> UnwindSafe for PrimitiveRef<'a>
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